public function StaticDiscoveryDecorator::getDefinitions in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Component/Plugin/Discovery/StaticDiscoveryDecorator.php \Drupal\Component\Plugin\Discovery\StaticDiscoveryDecorator::getDefinitions()
Gets the definition of all plugins for this type.
Return value
mixed[] An array of plugin definitions (empty array if no definitions were found). Keys are plugin IDs.
Overrides StaticDiscovery::getDefinitions
See also
\Drupal\Core\Plugin\FilteredPluginManagerInterface::getFilteredDefinitions()
File
- core/
lib/ Drupal/ Component/ Plugin/ Discovery/ StaticDiscoveryDecorator.php, line 52
Class
- StaticDiscoveryDecorator
- A decorator that allows manual registration of undiscoverable definitions.
Namespace
Drupal\Component\Plugin\DiscoveryCode
public function getDefinitions() {
if (isset($this->registerDefinitions)) {
call_user_func($this->registerDefinitions);
}
$this->definitions += $this->decorated
->getDefinitions();
return parent::getDefinitions();
}