protected function SkinYamlDirectoryDiscovery::findFiles in Skinr 8.2
Returns an array of providers keyed by file path.
Return value
array An array of providers keyed by file path.
1 call to SkinYamlDirectoryDiscovery::findFiles()
- SkinYamlDirectoryDiscovery::findAll in src/
Component/ Discovery/ SkinYamlDirectoryDiscovery.php - Returns an array of discoverable items.
File
- src/
Component/ Discovery/ SkinYamlDirectoryDiscovery.php, line 121 - Contains \Drupal\skinr\Component\Discovery\SkinYamlDirectoryDiscovery.
Class
- SkinYamlDirectoryDiscovery
- Discovers multiple YAML files in a set of directories.
Namespace
Drupal\skinr\Component\DiscoveryCode
protected function findFiles() {
$file_list = [];
$pattern = '/\\.yml$/i';
foreach ($this->directories as $provider => $directories) {
$directories = (array) $directories;
foreach ($directories as $directory) {
if (is_dir($directory)) {
$files = file_scan_directory($directory, $pattern);
foreach ($files as $fileInfo) {
$file_list[$fileInfo->uri] = $provider;
}
}
}
}
return $file_list;
}