protected function TypeManager::getDiscovery in Charts 5.0.x
Same name and namespace in other branches
- 8.4 src/TypeManager.php \Drupal\charts\TypeManager::getDiscovery()
Gets the plugin discovery.
Return value
\Drupal\Component\Plugin\Discovery\DiscoveryInterface
Overrides DefaultPluginManager::getDiscovery
File
- src/
TypeManager.php, line 67
Class
- TypeManager
- Manages discovery and instantiation of charts_type_info plugins.
Namespace
Drupal\chartsCode
protected function getDiscovery() {
if (!isset($this->discovery)) {
$this->discovery = new YamlDiscovery('charts_types', $this->moduleHandler
->getModuleDirectories());
$this->discovery
->addTranslatableProperty('label', 'label_context');
$this->discovery = new ContainerDerivativeDiscoveryDecorator($this->discovery);
}
return $this->discovery;
}