function PageTitleBlock::build

Same name in other branches
  1. 9 core/lib/Drupal/Core/Block/Plugin/Block/PageTitleBlock.php \Drupal\Core\Block\Plugin\Block\PageTitleBlock::build()
  2. 8.9.x core/lib/Drupal/Core/Block/Plugin/Block/PageTitleBlock.php \Drupal\Core\Block\Plugin\Block\PageTitleBlock::build()
  3. 10 core/lib/Drupal/Core/Block/Plugin/Block/PageTitleBlock.php \Drupal\Core\Block\Plugin\Block\PageTitleBlock::build()

Overrides BlockPluginInterface::build

File

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

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,
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.