You are here

public function MultiValue::getInfo in SAML Authentication 4.x

Same name and namespace in other branches
  1. 8.3 src/Element/MultiValue.php \Drupal\samlauth\Element\MultiValue::getInfo()

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/MultiValue.php, line 145

Class

MultiValue
Provides a multi-value form element.

Namespace

Drupal\samlauth\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#input' => TRUE,
    '#theme' => 'field_multiple_value_form',
    '#cardinality_multiple' => TRUE,
    '#description' => NULL,
    '#cardinality' => self::CARDINALITY_UNLIMITED,
    '#add_more_label' => $this
      ->t('Add another item'),
    '#process' => [
      [
        $class,
        'processMultiValue',
      ],
      [
        $class,
        'processAjaxForm',
      ],
    ],
    '#element_validate' => [
      [
        $class,
        'validateMultiValue',
      ],
    ],
  ];
}