22 if ($request->
elgg()->session_manager->isLoggedIn()) {
26 if (!$request->
elgg()->config->walled_garden) {
36 if (!$request->
isXhr()) {
37 $request->
elgg()->session->set(
'last_forward_from',
$url);
54 $parts = parse_url($url);
55 unset($parts[
'query']);
56 unset($parts[
'fragment']);
58 $url =
rtrim($url,
'/') .
'/';
69 'ajax/view/languages.js',
72 'cache/[0-9]+/\w+/.*',
83 foreach ($public_routes as $public_route) {
84 $pattern =
"`^{$site_url}{$public_route}/*$`i";
getURL()
Get URL of the request.
$params
Saves global plugin settings.
__invoke(Request $request)
Gatekeeper.
isXhr()
Is the route access with XmlHttpRequest.
elgg_http_build_url(array $parts, bool $html_encode=true)
Builds a URL from the a parts array like one returned by parse_url().
elgg()
Get the DI container.
Protects a route from non-authenticated users in a walled garden mode.
isPublicPage(string $url)
Checks if the page should be allowed to be served in a walled garden mode.
Thrown when walled garden gatekeeper prevents access.
foreach($plugin_guids as $guid) if(empty($deactivated_plugins)) $url
_elgg_services()
Get the global service provider.