YamlDirectoryDiscovery::findFiles

protected YamlDirectoryDiscovery::findFiles()

Returns an array of providers keyed by file path.

Return value

array An array of providers keyed by file path.

File

core/lib/Drupal/Component/Discovery/YamlDirectoryDiscovery.php, line 125

Class

YamlDirectoryDiscovery
Discovers multiple YAML files in a set of directories.

Namespace

Drupal\Component\Discovery

Code

protected function findFiles() {
  $file_list = [];
  foreach ($this->directories as $provider => $directories) {
    $directories = (array) $directories;
    foreach ($directories as $directory) {
      if (is_dir($directory)) {
        /** @var \SplFileInfo $fileInfo */
        foreach ($this->getDirectoryIterator($directory) as $fileInfo) {
          $file_list[$fileInfo->getPathname()] = $provider;
        }
      }
    }
  }
  return $file_list;
}
doc_Drupal
2016-10-29 09:56:56
Comments
Leave a Comment

Please login to continue.