class 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

modules/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