diff --git a/core/lib/Drupal/Core/Render/Element/Optgroup.php b/core/lib/Drupal/Core/Render/Element/Optgroup.php index 7e43234..04b963c 100644 --- a/core/lib/Drupal/Core/Render/Element/Optgroup.php +++ b/core/lib/Drupal/Core/Render/Element/Optgroup.php @@ -18,7 +18,7 @@ * @see \Drupal\Core\Render\Element\Select * @see \Drupal\Core\Render\Element\Option */ -class Optgroup extends FormElement { +class Optgroup extends RenderElement { /** * {@inheritdoc} @@ -26,9 +26,6 @@ class Optgroup extends FormElement { public function getInfo() { $class = get_class($this); return array( - // Optgroup elements only ever appear inside of select elements and the - // select element handles the input for all optgroup elements. - '#input' => FALSE, '#process' => array( array($class, 'processOptgroup'), array($class, 'processAjaxForm'), diff --git a/core/lib/Drupal/Core/Render/Element/Option.php b/core/lib/Drupal/Core/Render/Element/Option.php index 3251fa6..036a10e 100644 --- a/core/lib/Drupal/Core/Render/Element/Option.php +++ b/core/lib/Drupal/Core/Render/Element/Option.php @@ -7,7 +7,6 @@ namespace Drupal\Core\Render\Element; -use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\Element; /** @@ -18,7 +17,7 @@ * @see \Drupal\Core\Render\Element\Select * @see \Drupal\Core\Render\Element\Optgroup */ -class Option extends FormElement { +class Option extends RenderElement { /** * {@inheritdoc} @@ -26,9 +25,6 @@ class Option extends FormElement { public function getInfo() { $class = get_class($this); return array( - // Option elements only ever appear inside of select elements and the - // select element handles the input for all option elements. - '#input' => FALSE, '#process' => array( array($class, 'processAjaxForm'), ), diff --git a/core/lib/Drupal/Core/Render/Element/Select.php b/core/lib/Drupal/Core/Render/Element/Select.php index 0280811..beae6bc 100644 --- a/core/lib/Drupal/Core/Render/Element/Select.php +++ b/core/lib/Drupal/Core/Render/Element/Select.php @@ -21,7 +21,7 @@ * @see \Drupal\Core\Render\Element\Option * @see \Drupal\Core\Render\Element\Optgroup */ -class Select extends Optgroup { +class Select extends FormElement { /** * {@inheritdoc} @@ -159,7 +159,7 @@ public static function processSelect(&$element, FormStateInterface $form_state, ); // @TODO - static::processOptgroup($element[$key], $form_state, $complete_form); + Optgroup::processOptgroup($element[$key], $form_state, $complete_form); unset($element['#options'][$key]); } @@ -167,7 +167,7 @@ public static function processSelect(&$element, FormStateInterface $form_state, } // Process the '#options' element in the same way that option groups do. - static::processOptgroup($element, $form_state, $complete_form); + Optgroup::processOptgroup($element, $form_state, $complete_form); return $element; }