public function checkRouteAccess(string $routeName, $user = null): bool
    {
        return $this->laRoute->checkRouteAccess($routeName, $user);
    }
public function checkRouteAccess(string $routeName, $user = null): bool
    {
        return $this->laRoute->checkRouteAccess($routeName, $user);
    }
public function checkRouteAccess ( string $ routeName , $ user = null ) : bool { return $ this -> laRoute -> checkRouteAccess ( $ routeName , $ user ) ; }
Twig extension callback for checking route access

If something goes wrong an error will be logged and the method will return FALSE. If no permissions are defined for the provided route it will return TRUE.

@param string        $routeName The name of the route
@param object|string $user      (optional)  Either a user object or a string to signify an anonymous user. If no user is supplied, the current user will be used.

@return bool TRUE if access is granted or FALSE if access is denied.
Twig extension callback for checking route access