You are here

protected function InstallablePluginManager::alterDefinitions in Markdown 8.2

Invokes the hook to alter the definitions if the alter hook is set.

Parameters

$definitions: The discovered plugin definitions.

Overrides DefaultPluginManager::alterDefinitions

3 calls to InstallablePluginManager::alterDefinitions()
ExtensionManager::alterDefinitions in src/PluginManager/ExtensionManager.php
Invokes the hook to alter the definitions if the alter hook is set.
InstallablePluginManager::findDefinitions in src/PluginManager/InstallablePluginManager.php
Finds plugin definitions.
InstallablePluginManager::getRuntimeDefinitions in src/PluginManager/InstallablePluginManager.php
Retrieves the runtime definitions.
2 methods override InstallablePluginManager::alterDefinitions()
AllowedHtmlManager::alterDefinitions in src/PluginManager/AllowedHtmlManager.php
Invokes the hook to alter the definitions if the alter hook is set.
ExtensionManager::alterDefinitions in src/PluginManager/ExtensionManager.php
Invokes the hook to alter the definitions if the alter hook is set.

File

src/PluginManager/InstallablePluginManager.php, line 116

Class

InstallablePluginManager
Installable Plugin Manager.

Namespace

Drupal\markdown\PluginManager

Code

protected function alterDefinitions(&$definitions, $runtime = FALSE) {
  foreach ($definitions as $definition) {
    if ($definition instanceof InstallablePlugin) {
      $this
        ->alterDefinition($definition, $runtime);
    }
  }
  if ($hook = $this->alterHook) {
    if ($runtime) {
      $hook = "_runtime";
    }
    $this->moduleHandler
      ->alter($hook, $definitions);
  }
}