public function FlushSingleImage::getStylePaths in Flush Single Image Styles 8
{inheritdoc}
Overrides FlushSingleImageInterface::getStylePaths
1 call to FlushSingleImage::getStylePaths()
- FlushSingleImage::flush in src/
FlushSingleImage.php - {inheritdoc}
File
- src/
FlushSingleImage.php, line 53
Class
- FlushSingleImage
- Class FlushSingleImage.
Namespace
Drupal\flush_single_imageCode
public function getStylePaths($path) {
$path = $this
->buildUri($path);
$styles = $this->entityTypeManager
->getStorage('image_style')
->loadMultiple();
$style_paths = [];
foreach ($styles as $style) {
$style_path = $style
->buildUri($path);
if (is_file($style_path) && file_exists($style_path)) {
$style_paths[] = $style_path;
}
}
return $style_paths;
}