public function LingotekSettingsDefaultsForm::submitForm in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 src/Form/LingotekSettingsDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsDefaultsForm::submitForm()
- 4.0.x src/Form/LingotekSettingsDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsDefaultsForm::submitForm()
- 3.0.x src/Form/LingotekSettingsDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsDefaultsForm::submitForm()
- 3.1.x src/Form/LingotekSettingsDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsDefaultsForm::submitForm()
- 3.2.x src/Form/LingotekSettingsDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsDefaultsForm::submitForm()
- 3.3.x src/Form/LingotekSettingsDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsDefaultsForm::submitForm()
- 3.4.x src/Form/LingotekSettingsDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsDefaultsForm::submitForm()
- 3.5.x src/Form/LingotekSettingsDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsDefaultsForm::submitForm()
- 3.6.x src/Form/LingotekSettingsDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsDefaultsForm::submitForm()
- 3.7.x src/Form/LingotekSettingsDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsDefaultsForm::submitForm()
- 3.8.x src/Form/LingotekSettingsDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsDefaultsForm::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
1 method overrides LingotekSettingsDefaultsForm::submitForm()
- LingotekSettingsEditDefaultsForm::submitForm in src/
Form/ LingotekSettingsEditDefaultsForm.php - Form submission handler.
File
- src/
Form/ LingotekSettingsDefaultsForm.php, line 77 - Contains \Drupal\lingotek\Form\LingotekSettingsProjectVaultForm.
Class
- LingotekSettingsDefaultsForm
- Configure text display settings for this page.
Namespace
Drupal\lingotek\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$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();
// Since the lingotek module is newly installed, assign the callback
$this
->setCallbackUrl($config);
$form_state
->setRedirect('lingotek.dashboard');
parent::submitForm($form, $form_state);
}