function InstallerAccessPolicy::getPersistentCacheContexts
Same name in other branches
- 11.x core/lib/Drupal/Core/Installer/InstallerAccessPolicy.php \Drupal\Core\Installer\InstallerAccessPolicy::getPersistentCacheContexts()
Overrides AccessPolicyBase::getPersistentCacheContexts
File
-
core/
lib/ Drupal/ Core/ Installer/ InstallerAccessPolicy.php, line 35
Class
- InstallerAccessPolicy
- Grants user 1 an all access pass during install.
Namespace
Drupal\Core\InstallerCode
public function getPersistentCacheContexts() : array {
// Note that cache contexts in the installer are ignored because
// \Drupal\Core\Installer\NormalInstallerServiceProvider::register() changes
// everything to use a memory cache. If this was not the case, then this
// should also return a cache context related to the return value of
// \Drupal\Core\Installer\InstallerKernel::installationAttempted().
return [
'user.is_super_user',
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.