You are here

public function CardCode::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/CardCode.php, line 19

Class

CardCode
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,
    '#maxlength' => 4,
    '#autocomplete_route_name' => FALSE,
    '#element_validate' => [
      [
        $class,
        'validateCardCode',
      ],
    ],
    '#process' => [
      [
        $class,
        'processCardCode',
      ],
    ],
    '#pre_render' => [
      [
        $class,
        'preRenderCardCode',
      ],
    ],
    '#theme' => 'input__textfield',
    '#theme_wrappers' => [
      'form_element',
    ],
  ];
}