Gatekeeper.
More...
|
| | __construct (protected SessionManagerService $session_manager, protected HttpRequest $request, protected RedirectService $redirects, protected EntityTable $entities, protected AccessCollections $access, protected Translator $translator) |
| | Constructor. More...
|
| |
| | assertAuthenticatedUser () |
| | Require a user to be authenticated to with code execution. More...
|
| |
| | assertUnauthenticatedUser () |
| | Require a user to be not authenticated (logged out) to with code execution. More...
|
| |
| | assertAuthenticatedAdmin () |
| | Require an admin user to be authenticated to proceed with code execution. More...
|
| |
| | assertExists (int $guid, ?string $type=null, ?string $subtype=null) |
| | Require an entity with a given guid, type and subtype to proceed with code execution. More...
|
| |
| | assertAccessibleEntity (\ElggEntity $entity, ?\ElggUser $user=null, bool $validate_can_edit=false) |
| | Require that authenticated user has access to entity. More...
|
| |
| | assertAccessibleUser (\ElggUser $user, ?\ElggUser $viewer=null) |
| | Validate active user account. More...
|
| |
| | assertAccessibleGroup (\ElggGroup $group, ?\ElggUser $user=null) |
| | Validate group content visibility. More...
|
| |
| | assertXmlHttpRequest () |
| | Require XmlHttpRequest. More...
|
| |
Gatekeeper.
Use elgg()->gatekeeper
Definition at line 24 of file Gatekeeper.php.
◆ __construct()
◆ assertAccessibleEntity()
| Elgg\Gatekeeper::assertAccessibleEntity |
( |
\ElggEntity |
$entity, |
|
|
?\ElggUser |
$user = null, |
|
|
bool |
$validate_can_edit = false |
|
) |
| |
Require that authenticated user has access to entity.
- Parameters
-
| \ElggEntity | $entity | Entity |
| \ElggUser | null | $user | User |
| bool | $validate_can_edit | flag to check canEdit access |
- Returns
- void
- Exceptions
-
Definition at line 141 of file Gatekeeper.php.
◆ assertAccessibleGroup()
| Elgg\Gatekeeper::assertAccessibleGroup |
( |
\ElggGroup |
$group, |
|
|
?\ElggUser |
$user = null |
|
) |
| |
Validate group content visibility.
- Parameters
-
| \ElggGroup | $group | Group entity |
| \ElggUser | null | $user | User entity |
- Returns
- void
- Exceptions
-
| GroupGatekeeperException | |
| GatekeeperException | |
Definition at line 252 of file Gatekeeper.php.
◆ assertAccessibleUser()
| Elgg\Gatekeeper::assertAccessibleUser |
( |
\ElggUser |
$user, |
|
|
?\ElggUser |
$viewer = null |
|
) |
| |
Validate active user account.
- Parameters
-
| \ElggUser | $user | User |
| \ElggUser | null | $viewer | Viewing user |
- Returns
- void
- Exceptions
-
Definition at line 222 of file Gatekeeper.php.
◆ assertAuthenticatedAdmin()
| Elgg\Gatekeeper::assertAuthenticatedAdmin |
( |
| ) |
|
Require an admin user to be authenticated to proceed with code execution.
- Returns
- void
- Exceptions
-
| GatekeeperException | |
| AdminGatekeeperException | |
Definition at line 86 of file Gatekeeper.php.
◆ assertAuthenticatedUser()
| Elgg\Gatekeeper::assertAuthenticatedUser |
( |
| ) |
|
Require a user to be authenticated to with code execution.
- Returns
- void
- Exceptions
-
| LoggedInGatekeeperException | |
Definition at line 52 of file Gatekeeper.php.
◆ assertExists()
| Elgg\Gatekeeper::assertExists |
( |
int |
$guid, |
|
|
?string |
$type = null, |
|
|
?string |
$subtype = null |
|
) |
| |
Require an entity with a given guid, type and subtype to proceed with code execution.
- Warning
- Returned entity has been retrieved with ignored access, as well including disabled entities. You must validate entity access on the return of this method.
- Parameters
-
| int | $guid | GUID of the entity |
| string | null | $type | Entity type |
| string | null | $subtype | Entity subtype |
- Returns
- \ElggEntity
- Exceptions
-
Definition at line 112 of file Gatekeeper.php.
◆ assertUnauthenticatedUser()
| Elgg\Gatekeeper::assertUnauthenticatedUser |
( |
| ) |
|
Require a user to be not authenticated (logged out) to with code execution.
- Returns
- void
- Exceptions
-
| LoggedOutGatekeeperException | |
Definition at line 68 of file Gatekeeper.php.
◆ assertXmlHttpRequest()
| Elgg\Gatekeeper::assertXmlHttpRequest |
( |
| ) |
|
Require XmlHttpRequest.
- Returns
- void
- Exceptions
-
Definition at line 277 of file Gatekeeper.php.
The documentation for this class was generated from the following file: