protected function InstallablePluginManager::findDefinitions in Markdown 8.2
Finds plugin definitions.
Return value
array List of definitions to store in cache.
Overrides DefaultPluginManager::findDefinitions
File
- src/
PluginManager/ InstallablePluginManager.php, line 213
Class
- InstallablePluginManager
- Installable Plugin Manager.
Namespace
Drupal\markdown\PluginManagerCode
protected function findDefinitions() {
$definitions = $this
->getDiscovery()
->getDefinitions();
// If this plugin was provided by a Drupal extension that does not exist,
// remove the plugin definition.
/* @var \Drupal\markdown\Annotation\InstallablePlugin $definition */
foreach ($definitions as $plugin_id => $definition) {
if (($provider = $definition
->getProvider()) && !in_array($provider, [
'core',
'component',
]) && !$this
->providerExists($provider)) {
unset($definitions[$plugin_id]);
}
}
foreach ($definitions as $plugin_id => &$definition) {
$this
->processDefinition($definition, $plugin_id);
}
$this
->alterDefinitions($definitions);
return $definitions;
}