function SystemMessagesBlock::build

Same name in other branches
  1. 9 core/modules/system/src/Plugin/Block/SystemMessagesBlock.php \Drupal\system\Plugin\Block\SystemMessagesBlock::build()
  2. 8.9.x core/modules/system/src/Plugin/Block/SystemMessagesBlock.php \Drupal\system\Plugin\Block\SystemMessagesBlock::build()
  3. 10 core/modules/system/src/Plugin/Block/SystemMessagesBlock.php \Drupal\system\Plugin\Block\SystemMessagesBlock::build()

Overrides BlockPluginInterface::build

File

core/modules/system/src/Plugin/Block/SystemMessagesBlock.php, line 34

Class

SystemMessagesBlock
Provides a block to display the messages.

Namespace

Drupal\system\Plugin\Block

Code

public function build() {
    return [
        '#type' => 'status_messages',
        '#include_fallback' => TRUE,
    ];
}

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