public function BlazyManagerBase::cropStyles in Blazy 7
Returns available image styles with crop in the name.
1 call to BlazyManagerBase::cropStyles()
- BlazyManagerBase::isCrop in src/
BlazyManagerBase.php - Checks if an image style contains crop effect.
File
- src/
BlazyManagerBase.php, line 180
Class
- BlazyManagerBase
- Implements BlazyManagerInterface.
Namespace
Drupal\blazyCode
public function cropStyles() {
if (!isset($this->cropStyles)) {
$this->cropStyles = [];
foreach (image_styles() as $style) {
foreach ($style['effects'] as $effect) {
if (strpos($effect['name'], 'crop') !== FALSE) {
$this->cropStyles[$style['name']] = $style['name'];
break;
}
}
}
}
return $this->cropStyles;
}