public function LoginStatusCheck::applies

Declares whether the access check applies to a specific route or not.

Parameters

\Symfony\Component\Routing\Route $route: The route to consider attaching to.

Return value

bool TRUE if the check applies to the passed route, FALSE otherwise.

Overrides AccessCheckInterface::applies

File

drupal/core/modules/user/lib/Drupal/user/Access/LoginStatusCheck.php, line 22
Contains \Drupal\user\Access\LoginStatusCheck.

Class

LoginStatusCheck
Determines access to routes based on login status of current user.

Namespace

Drupal\user\Access

Code

public function applies(Route $route) {
  return array_key_exists('_user_is_logged_in', $route
    ->getRequirements());
}