You are here

public function PageTitleBlock::build in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Block/Plugin/Block/PageTitleBlock.php \Drupal\Core\Block\Plugin\Block\PageTitleBlock::build()
  2. 9 core/lib/Drupal/Core/Block/Plugin/Block/PageTitleBlock.php \Drupal\Core\Block\Plugin\Block\PageTitleBlock::build()

File

core/lib/Drupal/Core/Block/Plugin/Block/PageTitleBlock.php, line 46

Class

PageTitleBlock
Provides a block to display the page title.

Namespace

Drupal\Core\Block\Plugin\Block

Code

public function build() {
  return [
    '#type' => 'page_title',
    '#title' => $this->title,
  ];
}