You are here

protected function DefaultPluginManager::alterDefinitions in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Plugin/DefaultPluginManager.php \Drupal\Core\Plugin\DefaultPluginManager::alterDefinitions()
  2. 9 core/lib/Drupal/Core/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 definitions.

5 calls to DefaultPluginManager::alterDefinitions()
DefaultPluginManager::findDefinitions in core/lib/Drupal/Core/Plugin/DefaultPluginManager.php
Finds plugin definitions.
EntityTypeManager::findDefinitions in core/lib/Drupal/Core/Entity/EntityTypeManager.php
Finds plugin definitions.
MigrateSourcePluginManager::findDefinitions in core/modules/migrate/src/Plugin/MigrateSourcePluginManager.php
Finds plugin definitions.
MigrationPluginManager::findDefinitions in core/modules/migrate/src/Plugin/MigrationPluginManager.php
Finds plugin definitions.
TypedConfigManager::alterDefinitions in core/lib/Drupal/Core/Config/TypedConfigManager.php
Invokes the hook to alter the definitions if the alter hook is set.
1 method overrides DefaultPluginManager::alterDefinitions()
TypedConfigManager::alterDefinitions in core/lib/Drupal/Core/Config/TypedConfigManager.php
Invokes the hook to alter the definitions if the alter hook is set.

File

core/lib/Drupal/Core/Plugin/DefaultPluginManager.php, line 332

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);
  }
}