You are here

public function DropzoneJs::getInfo in DropzoneJS 8

Same name and namespace in other branches
  1. 8.2 src/Element/DropzoneJs.php \Drupal\dropzonejs\Element\DropzoneJs::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/DropzoneJs.php, line 69

Class

DropzoneJs
Provides a DropzoneJS atop of the file element.

Namespace

Drupal\dropzonejs\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#input' => TRUE,
    '#process' => [
      [
        $class,
        'processDropzoneJs',
      ],
    ],
    '#pre_render' => [
      [
        $class,
        'preRenderDropzoneJs',
      ],
    ],
    '#theme' => 'dropzonejs',
    '#theme_wrappers' => [
      'form_element',
    ],
    '#tree' => TRUE,
    '#attached' => [
      'library' => [
        'dropzonejs/integration',
      ],
    ],
  ];
}