function AjaxColorForm::updateColor

Same name in other branches
  1. 8.x-1.x form_api_example/src/Form/AjaxColorForm.php \Drupal\form_api_example\Form\AjaxColorForm::updateColor()
  2. 4.0.x modules/form_api_example/src/Form/AjaxColorForm.php \Drupal\form_api_example\Form\AjaxColorForm::updateColor()

Ajax callback for the color dropdown.

File

modules/form_api_example/src/Form/AjaxColorForm.php, line 88

Class

AjaxColorForm
Implements the ajax demo form controller.

Namespace

Drupal\form_api_example\Form

Code

public function updateColor(array $form, FormStateInterface $form_state) {
    return $form['color_wrapper'];
}