public function LingotekSettingsTabPreferencesForm::submitForm in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::submitForm()
- 4.0.x src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::submitForm()
- 3.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 162
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);
$this->lingotek
->set('preference.language_specific_profiles', $form_values['language_specific_profiles']);
$this->lingotek
->set('preference.advanced_taxonomy_terms', $form_values['advanced_taxonomy_terms']);
$this->lingotek
->set('preference.advanced_parsing', $form_values['advanced_parsing']);
$lingotek_config
->setPreference('target_download_status', $form_values['target_download_status']);
$lingotek_config
->setDeleteRemoteAfterDisassociation($form_values['delete_tms_documents_upon_disassociation']);
parent::submitForm($form, $form_state);
}