function SystemMessagesBlock::build

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

File

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

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.