function ClaroHooks::preprocessStatusMessages

Same name and namespace in other branches
  1. 11.x core/themes/claro/src/Hook/ClaroHooks.php \Drupal\claro\Hook\ClaroHooks::preprocessStatusMessages()

Implements hook_preprocess_HOOK() for status_messages.

Attributes

#[Hook('preprocess_status_messages')]

File

core/themes/claro/src/Hook/ClaroHooks.php, line 1027

Class

ClaroHooks
Hook implementations for claro.

Namespace

Drupal\claro\Hook

Code

public function preprocessStatusMessages(&$variables) : void {
  $variables['title_ids'] = [];
  foreach ($variables['message_list'] as $message_type => $messages) {
    $variables['title_ids'][$message_type] = Html::getUniqueId("message-{$message_type}-title");
  }
}

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