public function LingotekSettingsTabPreferencesForm::submitForm in Lingotek Translation 3.0.x
Same name and namespace in other branches
- 8 src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::submitForm()
- 8.2 src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::submitForm()
- 4.0.x src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::submitForm()
- 3.1.x src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::submitForm()
- 3.2.x src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::submitForm()
- 3.3.x src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::submitForm()
- 3.4.x src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::submitForm()
- 3.5.x src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::submitForm()
- 3.6.x src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::submitForm()
- 3.7.x src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::submitForm()
- 3.8.x src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::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/ LingotekSettingsTabPreferencesForm.php, line 182
Class
- LingotekSettingsTabPreferencesForm
- Configure Lingotek
Namespace
Drupal\lingotek\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
/** @var \Drupal\lingotek\LingotekConfigurationServiceInterface $lingotek_config */
$lingotek_config = \Drupal::service('lingotek.configuration');
$form_values = $form_state
->getValues();
$this
->saveAdminMenu($form_values);
$this
->saveLanguageSwitcherSettings($form_values);
$this
->saveShowLanguageFields($form_values);
$this
->saveAlwaysShowTranslateTabs($form_values);
$lingotek_config
->setPreference('language_specific_profiles', $form_values['language_specific_profiles']);
$lingotek_config
->setPreference('advanced_taxonomy_terms', $form_values['advanced_taxonomy_terms']);
$lingotek_config
->setPreference('advanced_parsing', $form_values['advanced_parsing']);
$lingotek_config
->setPreference('append_type_to_title', $form_values['append_type_to_title']);
$lingotek_config
->setPreference('target_download_status', $form_values['target_download_status']);
$lingotek_config
->setPreference('enable_download_source', $form_values['enable_download_source']);
$lingotek_config
->setPreference('enable_download_interim', $form_values['enable_download_interim']);
$lingotek_config
->setPreference('split_download_all', $form_values['split_download_all']);
parent::submitForm($form, $form_state);
}