class ExampleUppercaseBlock

Same name in other branches
  1. 3.x modules/block_example/src/Plugin/Block/ExampleUppercaseBlock.php \Drupal\block_example\Plugin\Block\ExampleUppercaseBlock
  2. 4.0.x modules/block_example/src/Plugin/Block/ExampleUppercaseBlock.php \Drupal\block_example\Plugin\Block\ExampleUppercaseBlock

Provides a 'Example: uppercase this please' block.

Plugin annotation


@Block(
  id = "example_uppercase",
  admin_label = @Translation("Example: uppercase this please")
)

Hierarchy

Expanded class hierarchy of ExampleUppercaseBlock

File

block_example/src/Plugin/Block/ExampleUppercaseBlock.php, line 15

Namespace

Drupal\block_example\Plugin\Block
View source
class ExampleUppercaseBlock extends BlockBase {
    
    /**
     * {@inheritdoc}
     */
    public function build() {
        return [
            '#markup' => $this->t("This block's title is changed to uppercase. Any block title which contains 'uppercase' will also be changed to uppercase."),
        ];
    }

}

Members

Title Sort descending Modifiers Object type Summary
ExampleUppercaseBlock::build public function