Elgg  Version 3.0
Public Member Functions | Protected Attributes | List of all members
Elgg\ActionsService Class Reference

WARNING: API IN FLUX. More...

Public Member Functions

 __construct (RouteRegistrationService $routes, HandlersService $handlers)
 Constructor. More...
 
 register ($action, $handler="", $access= 'logged_in')
 Registers an action. More...
 
 unregister ($action)
 Unregisters an action. More...
 
 exists ($action)
 Check if an action is registered and its script exists. More...
 
 getAllActions ()
 Get all actions. More...
 

Protected Attributes

 $routes
 
 $handlers
 

Detailed Description

WARNING: API IN FLUX.

DO NOT USE DIRECTLY.

Use the elgg_* versions instead.

Definition at line 20 of file ActionsService.php.

Constructor & Destructor Documentation

Elgg\ActionsService::__construct ( RouteRegistrationService  $routes,
HandlersService  $handlers 
)

Constructor.

Parameters
RouteRegistrationService$routesRoutes
HandlersService$handlersHandlers service

Definition at line 51 of file ActionsService.php.

Member Function Documentation

Elgg\ActionsService::exists (   $action)

Check if an action is registered and its script exists.

Parameters
string$actionAction name
Returns
bool
See also
elgg_action_exists()

Definition at line 149 of file ActionsService.php.

Elgg\ActionsService::getAllActions ( )

Get all actions.

Returns
array

Definition at line 179 of file ActionsService.php.

Elgg\ActionsService::register (   $action,
  $handler = "",
  $access = 'logged_in' 
)

Registers an action.

Parameters
string$actionThe name of the action (eg "register", "account/settings/save")
string | callable$handlerOptionally, the filename where this action is located. If not specified, will assume the action is in elgg/actions/<action>.php
string$accessWho is allowed to execute this action: public, logged_in, admin. (default: logged_in)
Returns
bool
See also
elgg_register_action()
Exceptions

Definition at line 70 of file ActionsService.php.

Elgg\ActionsService::unregister (   $action)

Unregisters an action.

Parameters
string$actionAction name
Returns
bool
See also
elgg_unregister_action()

Definition at line 128 of file ActionsService.php.

Member Data Documentation

Elgg\ActionsService::$handlers
protected

Definition at line 43 of file ActionsService.php.

Elgg\ActionsService::$routes
protected

Definition at line 38 of file ActionsService.php.


The documentation for this class was generated from the following file: