You are here

public static function ElementBase::processSelectOrOther in Select (or other) 8

Same name and namespace in other branches
  1. 8.3 src/Element/ElementBase.php \Drupal\select_or_other\Element\ElementBase::processSelectOrOther()
  2. 4.x src/Element/ElementBase.php \Drupal\select_or_other\Element\ElementBase::processSelectOrOther()

Render API callback: Expands the select_or_other element type.

Expands the select or other element to have a 'select' and 'other' field.

3 calls to ElementBase::processSelectOrOther()
Buttons::processSelectOrOther in src/Element/Buttons.php
Render API callback: Expands the select_or_other element type.
ElementsTest::testProcessSelectOrOther in tests/src/Unit/ElementsTest.php
Tests the processing of a select or other element.
Select::processSelectOrOther in src/Element/Select.php
Render API callback: Expands the select_or_other element type.
2 methods override ElementBase::processSelectOrOther()
Buttons::processSelectOrOther in src/Element/Buttons.php
Render API callback: Expands the select_or_other element type.
Select::processSelectOrOther in src/Element/Select.php
Render API callback: Expands the select_or_other element type.

File

src/Element/ElementBase.php, line 102

Class

ElementBase
Base class for select or other form elements.

Namespace

Drupal\select_or_other\Element

Code

public static function processSelectOrOther(&$element, FormStateInterface $form_state, &$complete_form) {
  static::addSelectField($element);
  static::addOtherField($element);
  return $element;
}