You are here

public function PlUploadFile::getInfo in Plupload integration 8

Same name and namespace in other branches
  1. 2.0.x src/Element/PlUploadFile.php \Drupal\plupload\Element\PlUploadFile::getInfo()

Note: based on plupload_element_info().

Overrides ElementInterface::getInfo

File

src/Element/PlUploadFile.php, line 24

Class

PlUploadFile
Provides a PLUpload widget for uploading and saving files.

Namespace

Drupal\plupload\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#input' => TRUE,
    '#attributes' => [
      'class' => [
        'plupload-element',
      ],
    ],
    '#theme_wrappers' => [
      'form_element',
    ],
    '#theme' => 'container',
    '#attached' => [
      'library' => [
        'plupload/plupload',
      ],
    ],
    '#process' => [
      [
        $class,
        'processPlUploadFile',
      ],
    ],
    '#element_validate' => [
      [
        $class,
        'validatePlUploadFile',
      ],
    ],
    '#pre_render' => [
      [
        $class,
        'preRenderPlUploadFile',
      ],
    ],
  ];
}