public function FormModeManagerLinksForm::submitForm in Form mode manager 8
Same name and namespace in other branches
- 8.2 src/Form/FormModeManagerLinksForm.php \Drupal\form_mode_manager\Form\FormModeManagerLinksForm::submitForm()
Form submission handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides ConfigFormBase::submitForm
File
- src/
Form/ FormModeManagerLinksForm.php, line 130
Class
- FormModeManagerLinksForm
- Configure Form Mode Manager links.
Namespace
Drupal\form_mode_manager\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
$form_modes = array_keys($this->formModeManager
->getAllFormModesDefinitions(TRUE));
foreach ($form_modes as $entity_type_id) {
$this->settings
->set("local_tasks.{$entity_type_id}.position", $form_state
->getValue('tasks_location_' . $entity_type_id));
}
$this->settings
->save();
$this->cacheTagsInvalidator
->invalidateTags([
'local_task',
'rendered',
]);
}