public function StaticDiscovery::getDefinitions in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Component/Plugin/Discovery/StaticDiscovery.php \Drupal\Component\Plugin\Discovery\StaticDiscovery::getDefinitions()
- 9 core/lib/Drupal/Component/Plugin/Discovery/StaticDiscovery.php \Drupal\Component\Plugin\Discovery\StaticDiscovery::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 DiscoveryTrait::getDefinitions
See also
\Drupal\Core\Plugin\FilteredPluginManagerInterface::getFilteredDefinitions()
1 call to StaticDiscovery::getDefinitions()
- StaticDiscoveryDecorator::getDefinitions in core/
lib/ Drupal/ Component/ Plugin/ Discovery/ StaticDiscoveryDecorator.php - Gets the definition of all plugins for this type.
1 method overrides StaticDiscovery::getDefinitions()
- StaticDiscoveryDecorator::getDefinitions in core/
lib/ Drupal/ Component/ Plugin/ Discovery/ StaticDiscoveryDecorator.php - Gets the definition of all plugins for this type.
File
- core/
lib/ Drupal/ Component/ Plugin/ Discovery/ StaticDiscovery.php, line 16
Class
- StaticDiscovery
- A discovery mechanism that allows plugin definitions to be manually registered rather than actively discovered.
Namespace
Drupal\Component\Plugin\DiscoveryCode
public function getDefinitions() {
if (!$this->definitions) {
$this->definitions = [];
}
return $this->definitions;
}