public function Messages::render in Drupal 8
Same name and namespace in other branches
- 9 core/modules/views/src/Plugin/views/area/Messages.php \Drupal\views\Plugin\views\area\Messages::render()
- 10 core/modules/views/src/Plugin/views/area/Messages.php \Drupal\views\Plugin\views\area\Messages::render()
Render the area.
Parameters
bool $empty: (optional) Indicator if view result is empty or not. Defaults to FALSE.
Return value
array In any case we need a valid Drupal render array to return.
Overrides AreaPluginBase::render
File
- core/
modules/ views/ src/ Plugin/ views/ area/ Messages.php, line 27
Class
- Messages
- Provides an area for messages.
Namespace
Drupal\views\Plugin\views\areaCode
public function render($empty = FALSE) {
if (!$empty || !empty($this->options['empty'])) {
return [
'#type' => 'status_messages',
];
}
return [];
}