function ComponentPluginManager::getScanDirectories

Same name in this branch
  1. 11.x core/modules/sdc/src/ComponentPluginManager.php \Drupal\sdc\ComponentPluginManager::getScanDirectories()
Same name and namespace in other branches
  1. 10 core/modules/sdc/src/ComponentPluginManager.php \Drupal\sdc\ComponentPluginManager::getScanDirectories()

Get the list of directories to scan.

Return value

string[] The directories.

1 call to ComponentPluginManager::getScanDirectories()
ComponentPluginManager::getDiscovery in core/lib/Drupal/Core/Theme/ComponentPluginManager.php
Gets the plugin discovery.

File

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

Class

ComponentPluginManager
Defines a plugin manager to deal with components.

Namespace

Drupal\Core\Theme

Code

private function getScanDirectories() : array {
    $extension_directories = [
        $this->moduleHandler
            ->getModuleDirectories(),
        $this->themeHandler
            ->getThemeDirectories(),
    ];
    return array_map(static fn(string $path) => rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . 'components', $extension_directories);
}

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