function SessionConfiguration::hasSession

Same name in other branches
  1. 9 core/lib/Drupal/Core/Session/SessionConfiguration.php \Drupal\Core\Session\SessionConfiguration::hasSession()
  2. 10 core/lib/Drupal/Core/Session/SessionConfiguration.php \Drupal\Core\Session\SessionConfiguration::hasSession()
  3. 11.x core/lib/Drupal/Core/Session/SessionConfiguration.php \Drupal\Core\Session\SessionConfiguration::hasSession()

Overrides SessionConfigurationInterface::hasSession

File

core/lib/Drupal/Core/Session/SessionConfiguration.php, line 33

Class

SessionConfiguration
Defines the default session configuration generator.

Namespace

Drupal\Core\Session

Code

public function hasSession(Request $request) {
    return $request->cookies
        ->has($this->getName($request));
}

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