You are here

public function JQueryColorpickerElement::getInfo in Jquery Colorpicker 8.2

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/JQueryColorpickerElement.php, line 20

Class

JQueryColorpickerElement
Provides a jQuery colorpicker form element.

Namespace

Drupal\jquery_colorpicker\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#input' => TRUE,
    '#maxlength' => 7,
    '#size' => 7,
    '#element_validate' => [
      [
        $class,
        'validateElement',
      ],
    ],
    '#jquery_colorpicker_background' => 'select.png',
    '#pre_render' => [
      [
        $class,
        'preRenderjQueryColorpicker',
      ],
    ],
    '#process' => [
      'Drupal\\Core\\Render\\Element\\RenderElement::processAjaxForm',
      [
        $class,
        'processElement',
      ],
    ],
    '#theme' => 'jquery_colorpicker',
    '#theme_wrappers' => [
      'form_element',
    ],
    '#attached' => [
      'library' => [
        'jquery_colorpicker/element',
      ],
    ],
  ];
}