protected function ConfigMapperManager::findDefinitions in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/config_translation/src/ConfigMapperManager.php \Drupal\config_translation\ConfigMapperManager::findDefinitions()
Finds plugin definitions.
Return value
array List of definitions to store in cache.
Overrides DefaultPluginManager::findDefinitions
File
- core/
modules/ config_translation/ src/ ConfigMapperManager.php, line 150 - Contains \Drupal\config_translation\ConfigMapperManager.
Class
- ConfigMapperManager
- Manages plugins for configuration translation mappers.
Namespace
Drupal\config_translationCode
protected function findDefinitions() {
$definitions = $this
->getDiscovery()
->getDefinitions();
foreach ($definitions as $plugin_id => &$definition) {
$this
->processDefinition($definition, $plugin_id);
}
if ($this->alterHook) {
$this->moduleHandler
->alter($this->alterHook, $definitions);
}
// If this plugin was provided by a module that does not exist, remove the
// plugin definition.
foreach ($definitions as $plugin_id => $plugin_definition) {
if (isset($plugin_definition['provider']) && !in_array($plugin_definition['provider'], array(
'core',
'component',
)) && (!$this->moduleHandler
->moduleExists($plugin_definition['provider']) && !in_array($plugin_definition['provider'], array_keys($this->themeHandler
->listInfo())))) {
unset($definitions[$plugin_id]);
}
}
return $definitions;
}