You are here

protected function LingotekSettingsTabPreferencesForm::saveAlwaysShowTranslateTabs in Lingotek Translation 3.5.x

Same name and namespace in other branches
  1. 8 src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::saveAlwaysShowTranslateTabs()
  2. 8.2 src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::saveAlwaysShowTranslateTabs()
  3. 4.0.x src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::saveAlwaysShowTranslateTabs()
  4. 3.0.x src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::saveAlwaysShowTranslateTabs()
  5. 3.1.x src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::saveAlwaysShowTranslateTabs()
  6. 3.2.x src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::saveAlwaysShowTranslateTabs()
  7. 3.3.x src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::saveAlwaysShowTranslateTabs()
  8. 3.4.x src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::saveAlwaysShowTranslateTabs()
  9. 3.6.x src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::saveAlwaysShowTranslateTabs()
  10. 3.7.x src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::saveAlwaysShowTranslateTabs()
  11. 3.8.x src/Form/LingotekSettingsTabPreferencesForm.php \Drupal\lingotek\Form\LingotekSettingsTabPreferencesForm::saveAlwaysShowTranslateTabs()
1 call to LingotekSettingsTabPreferencesForm::saveAlwaysShowTranslateTabs()
LingotekSettingsTabPreferencesForm::submitForm in src/Form/LingotekSettingsTabPreferencesForm.php
Form submission handler.

File

src/Form/LingotekSettingsTabPreferencesForm.php, line 298

Class

LingotekSettingsTabPreferencesForm
Configure Lingotek

Namespace

Drupal\lingotek\Form

Code

protected function saveAlwaysShowTranslateTabs($form_values) {
  $config = \Drupal::configFactory()
    ->getEditable('lingotek.settings');
  $config
    ->set('preference.always_show_translate_tabs', $form_values['always_show_translate_tabs'] ? TRUE : FALSE);
  if ($form_values['always_show_translate_tabs']) {
    $config
      ->set('preference.allow_local_editing', $form_values['allow_local_editing'] ? TRUE : FALSE);
  }
  else {
    $config
      ->set('preference.allow_local_editing', FALSE);
  }
  $config
    ->save();
}