You are here

public function CardExpiration::getInfo in Creditfield Form Element 8

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/CardExpiration.php, line 19

Class

CardExpiration
Provides a one-line credit card number field form element.

Namespace

Drupal\creditfield\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#input' => TRUE,
    '#element_validate' => [
      [
        $class,
        'validateCardExpiration',
      ],
    ],
    '#process' => [
      [
        $class,
        'processCardExpiration',
      ],
    ],
    '#pre_render' => [
      [
        $class,
        'preRenderCardExpiration',
      ],
    ],
    '#theme' => 'input__date',
    '#theme_wrappers' => [
      'form_element',
    ],
  ];
}