public static function LightgalleryManager::getImageStyles in Lightgallery 8
Returns formatted array of all image styles.
1 call to LightgalleryManager::getImageStyles()
- LightgalleryFormatter::settingsSummary in src/
Plugin/ Field/ FieldFormatter/ LightgalleryFormatter.php - Returns a short summary for the current formatter settings.
File
- src/
Manager/ LightgalleryManager.php, line 137
Class
- LightgalleryManager
- Light gallery manager.
Namespace
Drupal\lightgallery\ManagerCode
public static function getImageStyles() {
$options = [
'' => t('Original image'),
];
$image_styles = ImageStyle::loadMultiple();
/** @var \Drupal\image\Entity\ImageStyle $image_style */
foreach ($image_styles as $image_style) {
$options[$image_style
->id()] = $image_style
->label();
}
return $options;
}