function ComponentPluginManager::getDiscovery

Same name in this branch
  1. 11.x core/modules/sdc/src/ComponentPluginManager.php \Drupal\sdc\ComponentPluginManager::getDiscovery()
Same name in other branches
  1. 10 core/modules/sdc/src/ComponentPluginManager.php \Drupal\sdc\ComponentPluginManager::getDiscovery()
  2. 10 core/lib/Drupal/Core/Theme/ComponentPluginManager.php \Drupal\Core\Theme\ComponentPluginManager::getDiscovery()

Overrides DefaultPluginManager::getDiscovery

File

core/lib/Drupal/Core/Theme/ComponentPluginManager.php, line 220

Class

ComponentPluginManager
Defines a plugin manager to deal with components.

Namespace

Drupal\Core\Theme

Code

protected function getDiscovery() : DirectoryWithMetadataPluginDiscovery {
    if (!isset($this->discovery)) {
        $directories = $this->getScanDirectories();
        $this->discovery = new DirectoryWithMetadataPluginDiscovery($directories, 'component', $this->fileSystem);
    }
    return $this->discovery;
}

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