You are here

protected function MiconDiscoveryManager::getDiscovery in Micon 8

Same name and namespace in other branches
  1. 2.x src/MiconDiscoveryManager.php \Drupal\micon\MiconDiscoveryManager::getDiscovery()

Gets the plugin discovery.

Return value

\Drupal\Component\Plugin\Discovery\DiscoveryInterface

Overrides DefaultPluginManager::getDiscovery

File

src/MiconDiscoveryManager.php, line 89

Class

MiconDiscoveryManager
Provides the default micon.icon manager.

Namespace

Drupal\micon

Code

protected function getDiscovery() {
  if (!isset($this->discovery)) {
    $this->discovery = new YamlDiscovery('micon.icons', $this->moduleHandler
      ->getModuleDirectories() + $this->themeHandler
      ->getThemeDirectories());
    $this->discovery = new ContainerDerivativeDiscoveryDecorator($this->discovery);
  }
  return $this->discovery;
}