public static function HighContrastTrait::highContrastEnabled in High contrast 8
Return if high contrast is enabled or not.
Return value
bool TRUE if enabled, FALSE otherwise.
4 calls to HighContrastTrait::highContrastEnabled()
- HighContrastCacheContext::getContext in src/
Cache/ Context/ HighContrastCacheContext.php - Returns the string representation of the cache context.
- HighContrastConfigOverride::loadOverrides in src/
HighContrastConfigOverride.php - @todo Override the right logo. See https://www.drupal.org/node/2866194
- HighContrastSwitchForm::buildForm in src/
Form/ HighContrastSwitchForm.php - Form constructor.
- high_contrast_page_attachments in ./
high_contrast.module - Implements hook_page_attachments().
File
- src/
HighContrastTrait.php, line 20
Class
- HighContrastTrait
- This is an abstraction wrapper for controlling high contrast.
Namespace
Drupal\high_contrastCode
public static function highContrastEnabled() {
return !empty($_SESSION['high_contrast']['enabled']) ? TRUE : FALSE;
}