public function LingotekSettingsTabUtilitiesForm::switchDebugUtilities in Lingotek Translation 3.8.x
Same name and namespace in other branches
- 8 src/Form/LingotekSettingsTabUtilitiesForm.php \Drupal\lingotek\Form\LingotekSettingsTabUtilitiesForm::switchDebugUtilities()
- 8.2 src/Form/LingotekSettingsTabUtilitiesForm.php \Drupal\lingotek\Form\LingotekSettingsTabUtilitiesForm::switchDebugUtilities()
- 4.0.x src/Form/LingotekSettingsTabUtilitiesForm.php \Drupal\lingotek\Form\LingotekSettingsTabUtilitiesForm::switchDebugUtilities()
- 3.0.x src/Form/LingotekSettingsTabUtilitiesForm.php \Drupal\lingotek\Form\LingotekSettingsTabUtilitiesForm::switchDebugUtilities()
- 3.1.x src/Form/LingotekSettingsTabUtilitiesForm.php \Drupal\lingotek\Form\LingotekSettingsTabUtilitiesForm::switchDebugUtilities()
- 3.2.x src/Form/LingotekSettingsTabUtilitiesForm.php \Drupal\lingotek\Form\LingotekSettingsTabUtilitiesForm::switchDebugUtilities()
- 3.3.x src/Form/LingotekSettingsTabUtilitiesForm.php \Drupal\lingotek\Form\LingotekSettingsTabUtilitiesForm::switchDebugUtilities()
- 3.4.x src/Form/LingotekSettingsTabUtilitiesForm.php \Drupal\lingotek\Form\LingotekSettingsTabUtilitiesForm::switchDebugUtilities()
- 3.5.x src/Form/LingotekSettingsTabUtilitiesForm.php \Drupal\lingotek\Form\LingotekSettingsTabUtilitiesForm::switchDebugUtilities()
- 3.6.x src/Form/LingotekSettingsTabUtilitiesForm.php \Drupal\lingotek\Form\LingotekSettingsTabUtilitiesForm::switchDebugUtilities()
- 3.7.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\FormCode
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'),
]));
}