You are here

public function EntitySelector::getInfo in Opigno Learning path 3.x

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 Select::getInfo

File

modules/opigno_user_selection/src/Element/EntitySelector.php, line 24

Class

EntitySelector
Provides a form element for entity selection.

Namespace

Drupal\opigno_user_selection\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#input' => TRUE,
    '#multiple' => FALSE,
    '#sort_options' => FALSE,
    '#sort_start' => NULL,
    '#process' => [
      [
        $class,
        'processSelect',
      ],
      [
        $class,
        'processAjaxForm',
      ],
    ],
    '#pre_render' => [
      [
        $class,
        'preRenderSelect',
      ],
    ],
    '#theme' => 'entity_selector',
    '#theme_wrappers' => [
      'form_element',
    ],
    '#options' => [],
  ];
}