public function BlazyFormatter::isCrop in Blazy 8.2
Checks if an image style contains crop effect.
Parameters
string $style: The image style to check for.
Return value
object|bool Returns the image style instance if it contains crop effect, else FALSE.
Overrides BlazyFormatterInterface::isCrop
1 call to BlazyFormatter::isCrop()
- BlazyFormatter::setImageDimensions in src/
BlazyFormatter.php - Sets dimensions once to reduce method calls, if image style contains crop.
File
- src/
BlazyFormatter.php, line 194
Class
- BlazyFormatter
- Provides common field formatter-related methods: Blazy, Slick.
Namespace
Drupal\blazyCode
public function isCrop($style) {
if (!isset($this->isCrop[$style])) {
$this->isCrop[$style] = $this
->cropStyles() && isset($this
->cropStyles()[$style]) ? $this
->cropStyles()[$style] : FALSE;
}
return $this->isCrop[$style];
}