You are here

public function ImageCrop::getInfo in Image Widget Crop 8

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

Returns the element properties for this element.

Return value

array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format.

Overrides ElementInterface::getInfo

File

src/Element/ImageCrop.php, line 25

Class

ImageCrop
Provides a form element for crop.

Namespace

Drupal\image_widget_crop\Element

Code

public function getInfo() {
  return [
    '#process' => [
      [
        static::class,
        'processCrop',
      ],
    ],
    '#file' => NULL,
    '#crop_preview_image_style' => 'crop_thumbnail',
    '#crop_type_list' => [],
    '#warn_multiple_usages' => FALSE,
    '#show_default_crop' => TRUE,
    '#show_crop_area' => FALSE,
    '#attached' => [
      'library' => 'image_widget_crop/cropper.integration',
    ],
    '#tree' => TRUE,
  ];
}