You are here

public function BlazyManagerBase::isCrop in Blazy 7

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.

2 calls to BlazyManagerBase::isCrop()
BlazyFormatter::setImageDimensions in src/BlazyFormatter.php
Sets dimensions once to reduce method calls, if image style contains crop.
BlazyManagerBase::buildDataBlazy in src/BlazyManagerBase.php
To be deprecated method.

File

src/BlazyManagerBase.php, line 204

Class

BlazyManagerBase
Implements BlazyManagerInterface.

Namespace

Drupal\blazy

Code

public function isCrop($style) {
  if (!isset($this->isCrop[$style])) {
    $this->isCrop[$style] = $this
      ->cropStyles() && isset($this
      ->cropStyles()[$style]);
  }
  return $this->isCrop[$style];
}