Gatekeeper.
More...
|
| __construct (ElggSession $session, HttpRequest $request, RedirectService $redirects, EntityTable $entities, AccessCollections $access, 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 ($guid, $type=null, $subtype=null) |
| Require an entity with a given guid, type and subtype to proceed with code execution. More...
|
|
| assertAccessibleEntity (ElggEntity $entity, ElggUser $user=null, $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 29 of file Gatekeeper.php.
Constructor.
- Parameters
-
ElggSession | $session | Session |
HttpRequest | $request | HTTP Request |
RedirectService | $redirects | Redirects Service |
EntityTable | $entities | Entity table |
AccessCollections | $access | Access collection table |
Translator | $translator | Translator |
Definition at line 71 of file Gatekeeper.php.
Elgg\Gatekeeper::assertAccessibleEntity |
( |
ElggEntity |
$entity, |
|
|
ElggUser |
$user = null , |
|
|
|
$validate_can_edit = false |
|
) |
| |
Require that authenticated user has access to entity.
- Parameters
-
- Returns
- void
- Exceptions
-
Definition at line 180 of file Gatekeeper.php.
Validate group content visibility.
- Parameters
-
- Returns
- void
- Exceptions
-
GroupGatekeeperException | |
GatekeeperException | |
Definition at line 291 of file Gatekeeper.php.
Elgg\Gatekeeper::assertAccessibleUser |
( |
ElggUser |
$user, |
|
|
ElggUser |
$viewer = null |
|
) |
| |
Validate active user account.
- Parameters
-
- Returns
- void
- Exceptions
-
Definition at line 261 of file Gatekeeper.php.
Elgg\Gatekeeper::assertAuthenticatedAdmin |
( |
| ) |
|
Require an admin user to be authenticated to proceed with code execution.
- Returns
- void
- Exceptions
-
GatekeeperException | |
AdminGatekeeperException | |
Definition at line 124 of file Gatekeeper.php.
Elgg\Gatekeeper::assertAuthenticatedUser |
( |
| ) |
|
Require a user to be authenticated to with code execution.
- Returns
- void
- Exceptions
-
LoggedInGatekeeperException | |
Definition at line 92 of file Gatekeeper.php.
Elgg\Gatekeeper::assertExists |
( |
|
$guid, |
|
|
|
$type = null , |
|
|
|
$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 | $type | Entity type |
string | $subtype | Entity subtype |
- Returns
- ElggEntity
- Exceptions
-
EntityNotFoundException | |
Exception | |
Definition at line 151 of file Gatekeeper.php.
Elgg\Gatekeeper::assertUnauthenticatedUser |
( |
| ) |
|
Require a user to be not authenticated (logged out) to with code execution.
- Returns
- void
- Exceptions
-
LoggedOutGatekeeperException | |
Definition at line 107 of file Gatekeeper.php.
Elgg\Gatekeeper::assertXmlHttpRequest |
( |
| ) |
|
Require XmlHttpRequest.
- Returns
- void
- Exceptions
-
Definition at line 316 of file Gatekeeper.php.
Elgg\Gatekeeper::$entities |
|
protected |
Elgg\Gatekeeper::$redirects |
|
protected |
Elgg\Gatekeeper::$request |
|
protected |
Elgg\Gatekeeper::$session |
|
protected |
Elgg\Gatekeeper::$translator |
|
protected |
The documentation for this class was generated from the following file: