public static function ImageCrop::requiredApplicable in Image Widget Crop 8.2
Evaluate if crop is applicable on current CropType.
Parameters
int $crop_applied: Crop applied parents.
string $operation: Label current operation.
Return value
bool True if current crop operation isn't "Reset crop" or False.
1 call to ImageCrop::requiredApplicable()
- ImageCrop::cropRequired in src/
Element/ ImageCrop.php - Form element validation handler for crop widget elements.
File
- src/
Element/ ImageCrop.php, line 513
Class
- ImageCrop
- Provides a form element for crop.
Namespace
Drupal\image_widget_crop\ElementCode
public static function requiredApplicable($crop_applied, $operation) {
return (int) $crop_applied === 0 && $operation !== 'Remove';
}