protected function Dropdown::getList in Image Effects 8
Same name in this branch
- 8 src/Plugin/image_effects/FontSelector/Dropdown.php \Drupal\image_effects\Plugin\image_effects\FontSelector\Dropdown::getList()
- 8 src/Plugin/image_effects/ImageSelector/Dropdown.php \Drupal\image_effects\Plugin\image_effects\ImageSelector\Dropdown::getList()
Same name and namespace in other branches
- 8.3 src/Plugin/image_effects/ImageSelector/Dropdown.php \Drupal\image_effects\Plugin\image_effects\ImageSelector\Dropdown::getList()
- 8.2 src/Plugin/image_effects/ImageSelector/Dropdown.php \Drupal\image_effects\Plugin\image_effects\ImageSelector\Dropdown::getList()
Returns an array of files with image extensions in the specified directory.
Return value
array Array of image files.
1 call to Dropdown::getList()
- Dropdown::selectionElement in src/
Plugin/ image_effects/ ImageSelector/ Dropdown.php - Return a form element to select the plugin content.
File
- src/
Plugin/ image_effects/ ImageSelector/ Dropdown.php, line 148
Class
- Dropdown
- Dropdown image selector plugin.
Namespace
Drupal\image_effects\Plugin\image_effects\ImageSelectorCode
protected function getList() {
$filelist = [];
if (is_dir($this->configuration['path']) && ($handle = opendir($this->configuration['path']))) {
while ($file = readdir($handle)) {
$extension = pathinfo($file, PATHINFO_EXTENSION);
if (in_array($extension, $this->imageFactory
->getSupportedExtensions())) {
$filelist[] = $file;
}
}
closedir($handle);
}
return $filelist;
}