public function LingotekSettingsEditDefaultsForm::submitForm in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 src/Form/LingotekSettingsEditDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsEditDefaultsForm::submitForm()
- 4.0.x src/Form/LingotekSettingsEditDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsEditDefaultsForm::submitForm()
- 3.0.x src/Form/LingotekSettingsEditDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsEditDefaultsForm::submitForm()
- 3.1.x src/Form/LingotekSettingsEditDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsEditDefaultsForm::submitForm()
- 3.2.x src/Form/LingotekSettingsEditDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsEditDefaultsForm::submitForm()
- 3.3.x src/Form/LingotekSettingsEditDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsEditDefaultsForm::submitForm()
- 3.4.x src/Form/LingotekSettingsEditDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsEditDefaultsForm::submitForm()
- 3.5.x src/Form/LingotekSettingsEditDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsEditDefaultsForm::submitForm()
- 3.6.x src/Form/LingotekSettingsEditDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsEditDefaultsForm::submitForm()
- 3.7.x src/Form/LingotekSettingsEditDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsEditDefaultsForm::submitForm()
- 3.8.x src/Form/LingotekSettingsEditDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsEditDefaultsForm::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 LingotekSettingsDefaultsForm::submitForm
File
- src/
Form/ LingotekSettingsEditDefaultsForm.php, line 30 - Contains \Drupal\lingotek\Form\LingotekSettingsEditDefaultsForm.
Class
- LingotekSettingsEditDefaultsForm
- Form for editing defaults.
Namespace
Drupal\lingotek\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
// When editing, we redirect to the account form, and we don't notify
// about callback url.
$config = $this
->configFactory()
->getEditable('lingotek.settings');
$form_values = $form_state
->getValues();
foreach ($this->defaults_labels as $key => $label) {
$config
->set('default.' . $key, $form_values[$key]);
}
$config
->save();
$form_state
->setRedirect('lingotek.settings');
}