You are here

public function UcQuantity::getInfo in Ubercart 8.4

File

uc_store/src/Element/UcQuantity.php, line 18

Class

UcQuantity
Provides a form element for Ubercart quantity input.

Namespace

Drupal\uc_store\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#input' => TRUE,
    '#size' => 5,
    '#maxlength' => 6,
    '#process' => [
      [
        $class,
        'processAjaxForm',
      ],
    ],
    '#element_validate' => [
      [
        $class,
        'validateQuantity',
      ],
    ],
    '#pre_render' => [
      [
        $class,
        'preRenderQuantity',
      ],
    ],
    '#theme' => 'input__textfield',
    '#theme_wrappers' => [
      'form_element',
    ],
    '#allow_zero' => FALSE,
  ];
}