You are here

function olivero_element_info_alter in Drupal 10

Same name and namespace in other branches
  1. 9 core/themes/olivero/olivero.theme \olivero_element_info_alter()

Implements hook_element_info_alter().

File

core/themes/olivero/olivero.theme, line 548
Functions to support theming in the Olivero theme.

Code

function olivero_element_info_alter(&$info) {
  if (array_key_exists('text_format', $info)) {
    $info['text_format']['#pre_render'][] = [
      OliveroPreRender::class,
      'textFormat',
    ];
  }
  if (isset($info['status_messages'])) {
    $info['status_messages']['#pre_render'][] = [
      OliveroPreRender::class,
      'messagePlaceholder',
    ];
  }
}