You are here

protected function DefaultPluginManager::alterDefinitions in Service Container 7.2

Same name and namespace in other branches
  1. 7 lib/Drupal/Component/Plugin/DefaultPluginManager.php \Drupal\Core\Plugin\DefaultPluginManager::alterDefinitions()

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

Parameters

$definitions: The discovered plugin defintions.

1 call to DefaultPluginManager::alterDefinitions()
DefaultPluginManager::findDefinitions in lib/Drupal/Component/Plugin/DefaultPluginManager.php
Finds plugin definitions.

File

lib/Drupal/Component/Plugin/DefaultPluginManager.php, line 330
Contains \Drupal\Core\Plugin\DefaultPluginManager.

Class

DefaultPluginManager
Base class for plugin managers.

Namespace

Drupal\Core\Plugin

Code

protected function alterDefinitions(&$definitions) {
  if ($this->alterHook) {
    $this->moduleHandler
      ->alter($this->alterHook, $definitions);
  }
}