You are here

public static function ImageCrop::setCoordinatesElement in Image Widget Crop 8.2

Same name and namespace in other branches
  1. 8 src/Element/ImageCrop.php \Drupal\image_widget_crop\Element\ImageCrop::setCoordinatesElement()

Set All sizes properties of the crops.

Return value

array|null Set all possible crop zone properties.

1 call to ImageCrop::setCoordinatesElement()
ImageCrop::getCropFormProperties in src/Element/ImageCrop.php
Update crop elements of crop into the form.

File

src/Element/ImageCrop.php, line 523

Class

ImageCrop
Provides a form element for crop.

Namespace

Drupal\image_widget_crop\Element

Code

public static function setCoordinatesElement() {
  return [
    'x' => [
      'label' => t('X coordinate'),
      'value' => NULL,
    ],
    'y' => [
      'label' => t('Y coordinate'),
      'value' => NULL,
    ],
    'width' => [
      'label' => t('Width'),
      'value' => NULL,
    ],
    'height' => [
      'label' => t('Height'),
      'value' => NULL,
    ],
  ];
}