You are here

public function BUEditorPluginManager::invokeAll in BUEditor 8

Same name and namespace in other branches
  1. 8.2 src/BUEditorPluginManager.php \Drupal\bueditor\BUEditorPluginManager::invokeAll()

Invokes a hook in all available plugins.

Return value

array An array of results keyed by plugin id.

5 calls to BUEditorPluginManager::invokeAll()
BUEditorPluginManager::alterEditorForm in src/BUEditorPluginManager.php
Alters a BUEditor Editor form.
BUEditorPluginManager::alterEditorJS in src/BUEditorPluginManager.php
Alters javascript data of a BUEditor Editor entity.
BUEditorPluginManager::alterToolbarWidget in src/BUEditorPluginManager.php
Alters a toolbar widget
BUEditorPluginManager::getButtonGroups in src/BUEditorPluginManager.php
Returns buttons grouped by owner plugin.
BUEditorPluginManager::validateEditorForm in src/BUEditorPluginManager.php
Validates a BUEditor Editor form.

File

src/BUEditorPluginManager.php, line 107

Class

BUEditorPluginManager
Provides a plugin manager for BUEditor Plugins.

Namespace

Drupal\bueditor

Code

public function invokeAll($hook, &$a = NULL, $b = NULL, $c = NULL) {
  $ret = [];
  if (in_array($hook, $this
    ->getHooks())) {
    foreach ($this
      ->getInstances() as $plugin => $instance) {
      $ret[$plugin] = $instance
        ->{$hook}($a, $b, $c);
    }
  }
  return $ret;
}