You are here

public function WebformExampleElement::getInfo in Webform 6.x

Same name and namespace in other branches
  1. 8.5 modules/webform_example_element/src/Element/WebformExampleElement.php \Drupal\webform_example_element\Element\WebformExampleElement::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

modules/webform_example_element/src/Element/WebformExampleElement.php, line 31

Class

WebformExampleElement
Provides a 'webform_example_element'.

Namespace

Drupal\webform_example_element\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#input' => TRUE,
    '#size' => 60,
    '#process' => [
      [
        $class,
        'processWebformElementExample',
      ],
      [
        $class,
        'processAjaxForm',
      ],
    ],
    '#element_validate' => [
      [
        $class,
        'validateWebformExampleElement',
      ],
    ],
    '#pre_render' => [
      [
        $class,
        'preRenderWebformExampleElement',
      ],
    ],
    '#theme' => 'input__webform_example_element',
    '#theme_wrappers' => [
      'form_element',
    ],
  ];
}