Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. InstallerAccessPolicy.php

function 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\Installer

Code

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',
    ];
}
RSS feed
Powered by Drupal