public function HighContrastTrait::enableHighContrast in High contrast 8
Enables high contrast mode.
2 calls to HighContrastTrait::enableHighContrast()
- HighContrastController::enable in src/
HighContrastController.php - Enable high contrast.
- HighContrastSwitchForm::submitForm in src/
Form/ HighContrastSwitchForm.php - Handles the saving of the high contrast state from select and radios. The links are handled via a route.
File
- src/
HighContrastTrait.php, line 27
Class
- HighContrastTrait
- This is an abstraction wrapper for controlling high contrast.
Namespace
Drupal\high_contrastCode
public function enableHighContrast() {
$_SESSION['high_contrast']['enabled'] = TRUE;
}