function DefaultPluginManager::findDefinitions
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Plugin/DefaultPluginManager.php \Drupal\Core\Plugin\DefaultPluginManager::findDefinitions()
- 10 core/lib/Drupal/Core/Plugin/DefaultPluginManager.php \Drupal\Core\Plugin\DefaultPluginManager::findDefinitions()
- 11.x core/lib/Drupal/Core/Plugin/DefaultPluginManager.php \Drupal\Core\Plugin\DefaultPluginManager::findDefinitions()
Finds plugin definitions.
Return value
array List of definitions to store in cache.
4 calls to DefaultPluginManager::findDefinitions()
- DefaultPluginManager::getDefinitions in core/
lib/ Drupal/ Core/ Plugin/ DefaultPluginManager.php - Gets the definition of all plugins for this type.
- HelpTopicPluginManager::findDefinitions in core/
modules/ help_topics/ src/ HelpTopicPluginManager.php - Finds plugin definitions.
- MigrateFieldPluginManager::findDefinitions in core/
modules/ migrate_drupal/ src/ Plugin/ MigrateFieldPluginManager.php - Finds plugin definitions.
- SectionStorageManager::findDefinitions in core/
modules/ layout_builder/ src/ SectionStorage/ SectionStorageManager.php - Finds plugin definitions.
7 methods override DefaultPluginManager::findDefinitions()
- ConfigMapperManager::findDefinitions in core/
modules/ config_translation/ src/ ConfigMapperManager.php - Finds plugin definitions.
- EntityTypeManager::findDefinitions in core/
lib/ Drupal/ Core/ Entity/ EntityTypeManager.php - Finds plugin definitions.
- HelpTopicPluginManager::findDefinitions in core/
modules/ help_topics/ src/ HelpTopicPluginManager.php - Finds plugin definitions.
- MigrateFieldPluginManager::findDefinitions in core/
modules/ migrate_drupal/ src/ Plugin/ MigrateFieldPluginManager.php - Finds plugin definitions.
- MigrateSourcePluginManager::findDefinitions in core/
modules/ migrate/ src/ Plugin/ MigrateSourcePluginManager.php - Finds plugin definitions.
File
-
core/
lib/ Drupal/ Core/ Plugin/ DefaultPluginManager.php, line 290
Class
- DefaultPluginManager
- Base class for plugin managers.
Namespace
Drupal\Core\PluginCode
protected function findDefinitions() {
$definitions = $this->getDiscovery()
->getDefinitions();
foreach ($definitions as $plugin_id => &$definition) {
$this->processDefinition($definition, $plugin_id);
}
$this->alterDefinitions($definitions);
// If this plugin was provided by a module that does not exist, remove the
// plugin definition.
foreach ($definitions as $plugin_id => $plugin_definition) {
$provider = $this->extractProviderFromDefinition($plugin_definition);
if ($provider && !in_array($provider, [
'core',
'component',
]) && !$this->providerExists($provider)) {
unset($definitions[$plugin_id]);
}
}
return $definitions;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.