Elgg
Version master
engine
classes
Elgg
Router
Middleware
GroupToolGatekeeper.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Elgg\Router\Middleware
;
4
5
use
Elgg\Exceptions\Http\Gatekeeper\GroupToolGatekeeperException
;
6
use
Elgg\Exceptions\HttpException
;
7
13
class
GroupToolGatekeeper
extends
GroupPageOwnerGatekeeper
{
14
20
public
function
__invoke
(\
Elgg
\
Request
$request
): void {
21
parent::
__invoke
(
$request
);
22
23
$group_tool =
$request
->getHttpRequest()?->getRoute()?->getOption(
'group_tool'
);
24
if
(empty($group_tool)) {
25
return
;
26
}
27
28
_elgg_services
()->gatekeeper->assertGroupToolEnabled($group_tool, $this->page_owner);
29
}
30
}
Elgg\Exceptions\HttpException
Generic HTTP exception.
Definition:
HttpException.php:10
Elgg\Exceptions\Http\Gatekeeper\GroupToolGatekeeperException
Thrown when the requested group tool isn't enabled for a group.
Definition:
GroupToolGatekeeperException.php:10
Elgg\Request
Request container.
Definition:
Request.php:12
Elgg\Router\Middleware\GroupPageOwnerGatekeeper
Check if the current route has a page owner entity and it is a group.
Definition:
GroupPageOwnerGatekeeper.php:10
Elgg\Router\Middleware\GroupToolGatekeeper
Check if the current route has a group_tool configured and that the group tool is enabled for the (gr...
Definition:
GroupToolGatekeeper.php:13
Elgg\Router\Middleware\GroupToolGatekeeper\__invoke
__invoke(\Elgg\Request $request)
{Validate the current request.the current requestvoid }
Definition:
GroupToolGatekeeper.php:20
_elgg_services
_elgg_services()
Get the global service provider.
Definition:
elgglib.php:343
$request
$request
Definition:
livesearch.php:12
Elgg\Router\Middleware
Definition:
ActionMiddleware.php:3
Elgg
Definition:
ActionsService.php:3
Generated on Tue Dec 9 2025 00:02:10 for Elgg by
1.9.1