function OliveroHooks::elementInfoAlter

Same name and namespace in other branches
  1. 11.x core/themes/olivero/src/Hook/OliveroHooks.php \Drupal\olivero\Hook\OliveroHooks::elementInfoAlter()

Implements hook_element_info_alter().

Attributes

#[Hook('element_info_alter')]

File

core/themes/olivero/src/Hook/OliveroHooks.php, line 529

Class

OliveroHooks
Hook implementations for olivero.

Namespace

Drupal\olivero\Hook

Code

public function elementInfoAlter(&$info) : void {
  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',
    ];
  }
}

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