public static function Select::processSelectOrOther in Select (or other) 8
Same name and namespace in other branches
- 8.3 src/Element/Select.php \Drupal\select_or_other\Element\Select::processSelectOrOther()
- 4.x src/Element/Select.php \Drupal\select_or_other\Element\Select::processSelectOrOther()
Render API callback: Expands the select_or_other element type.
Expands the select or other element to have a 'select' and 'other' field.
Overrides ElementBase::processSelectOrOther
1 call to Select::processSelectOrOther()
- SelectElementTest::testProcessSelectOrOther in tests/
src/ Unit/ SelectElementTest.php - Tests the processing of a select or other element.
File
- src/
Element/ Select.php, line 20
Class
- Select
- Provides a form element with a select box and other option.
Namespace
Drupal\select_or_other\ElementCode
public static function processSelectOrOther(&$element, FormStateInterface $form_state, &$complete_form) {
$element = parent::processSelectOrOther($element, $form_state, $complete_form);
static::setSelectType($element);
static::addEmptyOption($element);
static::addStatesHandling($element);
return $element;
}