function IconPackManager::getDiscovery

Overrides DefaultPluginManager::getDiscovery

File

core/lib/Drupal/Core/Theme/Icon/Plugin/IconPackManager.php, line 354

Class

IconPackManager
Defines an icon pack plugin manager to deal with icons.

Namespace

Drupal\Core\Theme\Icon\Plugin

Code

protected function getDiscovery() : DiscoveryInterface {
    if (!$this->discovery) {
        $this->discovery = new YamlDiscovery('icons', $this->moduleHandler
            ->getModuleDirectories() + $this->themeHandler
            ->getThemeDirectories());
        $this->discovery
            ->addTranslatableProperty('label')
            ->addTranslatableProperty('description');
        $this->discovery = new ContainerDerivativeDiscoveryDecorator($this->discovery);
    }
    return $this->discovery;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.