hook_quickedit_editor_alter

hook_quickedit_editor_alter(&$editors)

Allow modules to alter in-place editor plugin metadata.

This hook is called after the in-place editor plugins have been discovered, but before they are cached. Hence any alterations will be cached.

Parameters

array &$editors: An array of metadata on existing in-place editors, as collected by the annotation discovery mechanism.

See also

\Drupal\quickedit\Annotation\InPlaceEditor

\Drupal\quickedit\Plugin\EditorManager

Related topics

Hooks
Define functions that alter the behavior of Drupal core.

File

core/modules/quickedit/quickedit.api.php, line 26
Hooks provided by the Edit module.

Code

function hook_quickedit_editor_alter(&$editors) {
  // Cleanly override editor.module's in-place editor plugin.
  $editors['editor']['class'] = 'Drupal\advanced_editor\Plugin\quickedit\editor\AdvancedEditor';
}
doc_Drupal
2016-10-29 09:18:27
Comments
Leave a Comment

Please login to continue.