protected function AutomatedCropDefault::findUnknownValue in Automated Crop 8
Evaluate if with or height need to be calculated.
If we have already ALL cropBox sizes we just need to apply, it don't need to evaluate missing values.
Return value
bool|string The value to find or False if cropBox have any sizes found.
1 call to AutomatedCropDefault::findUnknownValue()
- AutomatedCropDefault::calculateCropBoxSize in src/
Plugin/ AutomatedCrop/ AutomatedCropDefault.php - Calculation of the dimensions of the crop area.
File
- src/
Plugin/ AutomatedCrop/ AutomatedCropDefault.php, line 95
Class
- AutomatedCropDefault
- Class Generic routing entity mapper.
Namespace
Drupal\automated_crop\Plugin\AutomatedCropCode
protected function findUnknownValue() {
if (!$this
->hasSizes()) {
return FALSE;
}
$valueToSearch = 'width';
if (!empty($this->cropBox['width']) && empty($this->cropBox['height'])) {
$valueToSearch = 'height';
}
return $valueToSearch;
}