protected function BaseValidatorForm::scanAllDirs in Advanced CSS/JS Aggregation 8.2
Same name and namespace in other branches
- 8.4 advagg_validator/src/Form/BaseValidatorForm.php \Drupal\advagg_validator\Form\BaseValidatorForm::scanAllDirs()
- 8.3 advagg_validator/src/Form/BaseValidatorForm.php \Drupal\advagg_validator\Form\BaseValidatorForm::scanAllDirs()
Recursively scan the drupal webroot for files matching the given extension.
Parameters
string $ext: Usually css or js.
Return value
array An array of files.
1 call to BaseValidatorForm::scanAllDirs()
- BaseValidatorForm::generateForm in advagg_validator/
src/ Form/ BaseValidatorForm.php - Generate a heirachical form sorted by path from asset files.
File
- advagg_validator/
src/ Form/ BaseValidatorForm.php, line 218
Class
- BaseValidatorForm
- Base form for all advagg validator options.
Namespace
Drupal\advagg_validator\FormCode
protected function scanAllDirs($ext) {
$options = [
'nodirmask' => '/(\\.git|.*\\/files*)/',
];
$output = $this
->scanDirectory(\Drupal::root(), '/.*\\.' . $ext . '$/', $options);
$files = [];
foreach ($output as $values) {
$files[] = str_replace(\Drupal::root() . '/', '', $values->uri);
}
return $files;
}