You are here

protected function EntityBrowserEnhancedPluginManager::getDiscovery in Entity Browser Enhance(d|r) 8

Gets the plugin discovery.

Return value

\Drupal\Component\Plugin\Discovery\DiscoveryInterface

Overrides DefaultPluginManager::getDiscovery

File

src/EntityBrowserEnhancedPluginManager.php, line 48

Class

EntityBrowserEnhancedPluginManager
Provides the default entity_browser_enhanced_plugin manager.

Namespace

Drupal\entity_browser_enhanced

Code

protected function getDiscovery() {
  if (!isset($this->discovery)) {
    $this->discovery = new YamlDiscovery('enhancers', $this->moduleHandler
      ->getModuleDirectories());
    $this->discovery
      ->addTranslatableProperty('label', 'label_context');
    $this->discovery = new ContainerDerivativeDiscoveryDecorator($this->discovery);
  }
  return $this->discovery;
}