You are here

public function AbstractAutomatedCrop::hasSizes in Automated Crop 8

Evaluate if user have set one of crop box area sizes.

Return value

bool Return if we have width OR height value completed or false.

2 calls to AbstractAutomatedCrop::hasSizes()
AutomatedCropDefault::calculateCropBoxSize in src/Plugin/AutomatedCrop/AutomatedCropDefault.php
Calculation of the dimensions of the crop area.
AutomatedCropDefault::findUnknownValue in src/Plugin/AutomatedCrop/AutomatedCropDefault.php
Evaluate if with or height need to be calculated.

File

src/AbstractAutomatedCrop.php, line 360

Class

AbstractAutomatedCrop
Provides a base class for each AutomatedCrop provider plugins.

Namespace

Drupal\automated_crop

Code

public function hasSizes() {
  if (!empty($this->cropBox['width'])) {
    return TRUE;
  }
  if (!empty($this->cropBox['height'])) {
    return TRUE;
  }
  return FALSE;
}