Determines access to routes based on login status of current user.
Expanded class hierarchy of LoginStatusCheck
class LoginStatusCheck implements AccessCheckInterface {
/**
* {@inheritdoc}
*/
public function applies(Route $route) {
return array_key_exists('_user_is_logged_in', $route
->getRequirements());
}
/**
* {@inheritdoc}
*/
public function access(Route $route, Request $request) {
return (bool) $GLOBALS['user']->uid;
}
}
Name | Modifiers |
Type![]() |
Description | Overrides |
---|---|---|---|---|
LoginStatusCheck:: |
public | function |
Declares whether the access check applies to a specific route or not. Overrides AccessCheckInterface:: |
|
LoginStatusCheck:: |
public | function |
Checks for access to route. Overrides AccessCheckInterface:: |
|
AccessCheckInterface:: |
constant | Grant access. | ||
AccessCheckInterface:: |
constant | Deny access. | ||
AccessCheckInterface:: |
constant | Block access. |