You are here

public function LingotekSettingsTabUtilitiesForm::switchDebugUtilities in Lingotek Translation 3.4.x

Same name and namespace in other branches
  1. 8 src/Form/LingotekSettingsTabUtilitiesForm.php \Drupal\lingotek\Form\LingotekSettingsTabUtilitiesForm::switchDebugUtilities()
  2. 8.2 src/Form/LingotekSettingsTabUtilitiesForm.php \Drupal\lingotek\Form\LingotekSettingsTabUtilitiesForm::switchDebugUtilities()
  3. 4.0.x src/Form/LingotekSettingsTabUtilitiesForm.php \Drupal\lingotek\Form\LingotekSettingsTabUtilitiesForm::switchDebugUtilities()
  4. 3.0.x src/Form/LingotekSettingsTabUtilitiesForm.php \Drupal\lingotek\Form\LingotekSettingsTabUtilitiesForm::switchDebugUtilities()
  5. 3.1.x src/Form/LingotekSettingsTabUtilitiesForm.php \Drupal\lingotek\Form\LingotekSettingsTabUtilitiesForm::switchDebugUtilities()
  6. 3.2.x src/Form/LingotekSettingsTabUtilitiesForm.php \Drupal\lingotek\Form\LingotekSettingsTabUtilitiesForm::switchDebugUtilities()
  7. 3.3.x src/Form/LingotekSettingsTabUtilitiesForm.php \Drupal\lingotek\Form\LingotekSettingsTabUtilitiesForm::switchDebugUtilities()
  8. 3.5.x src/Form/LingotekSettingsTabUtilitiesForm.php \Drupal\lingotek\Form\LingotekSettingsTabUtilitiesForm::switchDebugUtilities()
  9. 3.6.x src/Form/LingotekSettingsTabUtilitiesForm.php \Drupal\lingotek\Form\LingotekSettingsTabUtilitiesForm::switchDebugUtilities()
  10. 3.7.x src/Form/LingotekSettingsTabUtilitiesForm.php \Drupal\lingotek\Form\LingotekSettingsTabUtilitiesForm::switchDebugUtilities()
  11. 3.8.x src/Form/LingotekSettingsTabUtilitiesForm.php \Drupal\lingotek\Form\LingotekSettingsTabUtilitiesForm::switchDebugUtilities()

File

src/Form/LingotekSettingsTabUtilitiesForm.php, line 152

Class

LingotekSettingsTabUtilitiesForm
Tab for running Lingotek utilities in the settings page.

Namespace

Drupal\lingotek\Form

Code

public function switchDebugUtilities() {
  $value = $this->state
    ->get('lingotek.enable_debug_utilities', FALSE);
  $this->state
    ->set('lingotek.enable_debug_utilities', !$value);
  $this->routeBuilder
    ->rebuild();
  $this
    ->messenger()
    ->addStatus($this
    ->t('Debug utilities has been %enabled.', [
    '%enabled' => !$value ? $this
      ->t('enabled') : $this
      ->t('disabled'),
  ]));
}