function EditorTestHooks::editorInfoAlter

Implements hook_editor_info_alter().

Attributes

#[Hook('editor_info_alter')]

File

core/modules/editor/tests/modules/editor_test/src/Hook/EditorTestHooks.php, line 81

Class

EditorTestHooks
Hook implementations for editor_test.

Namespace

Drupal\editor_test\Hook

Code

public function editorInfoAlter(&$items) : void {
  if (!\Drupal::state()->get('editor_test_give_me_a_trex_thanks', FALSE)) {
    unset($items['trex']);
  }
}

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