function SuperUserAccessPolicy::getPersistentCacheContexts

Same name and namespace in other branches
  1. 10 core/lib/Drupal/Core/Session/SuperUserAccessPolicy.php \Drupal\Core\Session\SuperUserAccessPolicy::getPersistentCacheContexts()

Overrides AccessPolicyBase::getPersistentCacheContexts

File

core/lib/Drupal/Core/Session/SuperUserAccessPolicy.php, line 28

Class

SuperUserAccessPolicy
Grants user 1 an all access pass.

Namespace

Drupal\Core\Session

Code

public function getPersistentCacheContexts() : array {
    return [
        'user.is_super_user',
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.