public static function ImageCrop::getCropFormProperties in Image Widget Crop 8
Same name and namespace in other branches
- 8.2 src/Element/ImageCrop.php \Drupal\image_widget_crop\Element\ImageCrop::getCropFormProperties()
Update crop elements of crop into the form.
Parameters
array $original_properties: All properties calculate for apply to.
bool $edit: Context of this form.
Return value
array<string,array> Populate all crop elements into the form.
1 call to ImageCrop::getCropFormProperties()
- ImageCrop::getCropFormElement in src/
Element/ ImageCrop.php - Inject crop elements into the form.
File
- src/
Element/ ImageCrop.php, line 309
Class
- ImageCrop
- Provides a form element for crop.
Namespace
Drupal\image_widget_crop\ElementCode
public static function getCropFormProperties(array $original_properties, $edit) {
$crop_elements = self::setCoordinatesElement();
if (!empty($original_properties) && $edit) {
foreach ($crop_elements as $properties => $value) {
$crop_elements[$properties]['value'] = $original_properties[$properties];
}
}
return $crop_elements;
}