Elgg
Version 6.0
|
Actions service. More...
Public Member Functions | |
__construct (protected RouteRegistrationService $routes, protected HandlersService $handlers) | |
Constructor. More... | |
register (string $action, string $handler= '', string $access= 'logged_in', array $params=[]) | |
Registers an action. More... | |
unregister (string $action) | |
Unregisters an action. More... | |
exists (string $action) | |
Check if an action is registered and its script exists. More... | |
getAllActions () | |
Get all actions. More... | |
Actions service.
Definition at line 21 of file ActionsService.php.
Elgg\ActionsService::__construct | ( | protected RouteRegistrationService | $routes, |
protected HandlersService | $handlers | ||
) |
Constructor.
RouteRegistrationService | $routes | Routes |
HandlersService | $handlers | Handlers service |
Definition at line 44 of file ActionsService.php.
Elgg\ActionsService::exists | ( | string | $action | ) |
Check if an action is registered and its script exists.
string | $action | Action name |
Definition at line 141 of file ActionsService.php.
Elgg\ActionsService::getAllActions | ( | ) |
Elgg\ActionsService::register | ( | string | $action, |
string | $handler = '' , |
||
string | $access = 'logged_in' , |
||
array | $params = [] |
||
) |
Registers an action.
string | $action | The name of the action (eg "register", "account/settings/save") |
string | $handler | Optionally, the filename where this action is located. If not specified, will assume the action is in elgg/actions/<action>.php |
string | $access | Who is allowed to execute this action: public, logged_in, logged_out, admin. (default: logged_in) |
array | $params | Additional params for the action route registration:
|
Definition at line 61 of file ActionsService.php.
Elgg\ActionsService::unregister | ( | string | $action | ) |
Unregisters an action.
string | $action | Action name |
Definition at line 121 of file ActionsService.php.