function OliveroPreRender::messagePlaceholder
Same name in other branches
- 10 core/themes/olivero/src/OliveroPreRender.php \Drupal\olivero\OliveroPreRender::messagePlaceholder()
- 11.x core/themes/olivero/src/OliveroPreRender.php \Drupal\olivero\OliveroPreRender::messagePlaceholder()
Prerender callback for status_messages placeholder.
Parameters
array $element: A renderable array.
Return value
array The updated renderable array containing the placeholder.
File
-
core/
themes/ olivero/ src/ OliveroPreRender.php, line 37
Class
- OliveroPreRender
- Implements trusted prerender callbacks for the Olivero theme.
Namespace
Drupal\oliveroCode
public static function messagePlaceholder(array $element) {
if (isset($element['fallback']['#markup'])) {
$element['fallback']['#markup'] = '<div data-drupal-messages-fallback class="hidden messages-list"></div>';
}
return $element;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.