You are here

public function GranularityElement::getInfo in Duration Field 8.2

Same name and namespace in other branches
  1. 3.0.x src/Element/GranularityElement.php \Drupal\duration_field\Element\GranularityElement::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/GranularityElement.php, line 27

Class

GranularityElement
Provides the Granularity form element.

Namespace

Drupal\duration_field\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#input' => TRUE,
    '#tree' => TRUE,
    '#element_validate' => [
      [
        $class,
        'validateElement',
      ],
    ],
    '#pre_render' => [
      [
        $class,
        'preRenderElement',
      ],
    ],
    '#process' => [
      'Drupal\\Core\\Render\\Element\\RenderElement::processAjaxForm',
      [
        $class,
        'processElement',
      ],
    ],
    '#theme_wrappers' => [
      'form_element',
    ],
  ];
}