You are here

public function EntitySelect::getInfo in Commerce Core 8.2

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/EntitySelect.php, line 46

Class

EntitySelect
Provides a form input element for selecting one or multiple entities.

Namespace

Drupal\commerce\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#input' => TRUE,
    '#target_type' => '',
    '#multiple' => FALSE,
    '#hide_single_entity' => TRUE,
    '#autocomplete_threshold' => 7,
    '#autocomplete_size' => 60,
    '#autocomplete_placeholder' => '',
    '#process' => [
      [
        $class,
        'processEntitySelect',
      ],
      [
        $class,
        'processAjaxForm',
      ],
    ],
    '#element_validate' => [
      [
        $class,
        'validateEntitySelect',
      ],
    ],
  ];
}