public function TypeManager::getDefinitions in Charts 5.0.x
Same name and namespace in other branches
- 8.4 src/TypeManager.php \Drupal\charts\TypeManager::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 DefaultPluginManager::getDefinitions
See also
\Drupal\Core\Plugin\FilteredPluginManagerInterface::getFilteredDefinitions()
File
- src/
TypeManager.php, line 93
Class
- TypeManager
- Manages discovery and instantiation of charts_type_info plugins.
Namespace
Drupal\chartsCode
public function getDefinitions() {
$definitions = parent::getDefinitions();
// Allow other modules to alter the definition list.
$event = new TypesInfoEvent($definitions);
$this->eventDispatcher
->dispatch(ChartsEvents::TYPE_INFO, $event);
$definitions = $event
->getTypes();
return $definitions;
}