function ConfigHandlerExtra::submitForm
Same name in other branches
- 9 core/modules/views_ui/src/Form/Ajax/ConfigHandlerExtra.php \Drupal\views_ui\Form\Ajax\ConfigHandlerExtra::submitForm()
- 8.9.x core/modules/views_ui/src/Form/Ajax/ConfigHandlerExtra.php \Drupal\views_ui\Form\Ajax\ConfigHandlerExtra::submitForm()
- 11.x core/modules/views_ui/src/Form/Ajax/ConfigHandlerExtra.php \Drupal\views_ui\Form\Ajax\ConfigHandlerExtra::submitForm()
Overrides ViewsFormBase::submitForm
File
-
core/
modules/ views_ui/ src/ Form/ Ajax/ ConfigHandlerExtra.php, line 103
Class
- ConfigHandlerExtra
- Provides a form for configuring extra information for a Views UI item.
Namespace
Drupal\views_ui\Form\AjaxCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$view = $form_state->get('view');
$handler = $form_state->get('handler');
// Run it through the handler's submit function.
$handler->submitExtraOptionsForm($form['options'], $form_state);
$item = $handler->options;
// Store the data we're given.
foreach ($form_state->getValue('options') as $key => $value) {
$item[$key] = $value;
}
// Store the item back on the view
$view->getExecutable()
->setHandler($form_state->get('display_id'), $form_state->get('type'), $form_state->get('id'), $item);
// Write to cache
$view->cacheSet();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.