MultipleActionController Class Reference

Detailed Description

MultipleActionController executes multiple actions by passing them to the appropriate controllers and returning all results at once.

The controller supports the following actions:

Action default
Execute the given actions.
Parameter Description
in data An associative array with unique/sortable keys and values that describe an action to perform
out data An associative array with the same keys and values that describe the response of each action
Response Actions
ok In all cases

The data array may contain the following special variables, that will be replaced by the described values:

  • {last_created_oid:type} will be replaced by the oid lastly created object of the given type

An example of input data in JSON:

data: {
action1: {
action: "create",
params: {
oid: "Author:wcmffb298f3784dd49548a05d43d7bf88590",
name: "Ingo Herwig"
}
},
action2: {
action: "read",
params: {
oid: "{last_created_oid:Author}"
}
}
}

The output data for the preceding request could look like

data: {
action1: {
oid: "Author:123",
...
},
action2: {
object: {
oid: "Author:123",
modified: "2001-01-01 01:01",
creator: "admin"
...
}
}
}
Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 79 of file MultipleActionController.php.

+ Inheritance diagram for MultipleActionController:

Protected Member Functions

 validate ()
 
 doExecute ($method=null)
 
- Protected Member Functions inherited from Controller
 executeSubAction ($action)
 
 redirect ($location, $key=null, $data=null)
 
 getLogger ()
 
 getSession ()
 
 getPersistenceFacade ()
 
 getPermissionManager ()
 
 getActionMapper ()
 
 getLocalization ()
 
 getMessage ()
 
 getConfiguration ()
 
 requireTransaction ()
 
 endTransaction ($commit)
 
 isLocalizedRequest ()
 
 checkLanguageParameter ()
 
 generateCsrfToken ($name, $refresh=true)
 
 validateCsrfToken ($name, $invalidate=true)
 
 getLocalSessionValue ($key, $default=null)
 
 setLocalSessionValue ($key, $value)
 
 clearLocalSessionValues ()
 

Additional Inherited Members

- Public Member Functions inherited from Controller
 __construct (Session $session, PersistenceFacade $persistenceFacade, PermissionManager $permissionManager, ActionMapper $actionMapper, Localization $localization, Message $message, Configuration $configuration)
 
 initialize (Request $request, Response $response)
 
 execute ($method=null)
 
 getRequest ()
 
 getResponse ()
 
- Public Attributes inherited from Controller
const CSRF_TOKEN_PARAM = 'csrf_token'
 

Member Function Documentation

◆ validate()

validate ( )
protected
See also
Controller::validate()

Reimplemented from Controller.

Definition at line 84 of file MultipleActionController.php.

◆ doExecute()

doExecute (   $method = null)
protected
See also
Controller::doExecute()

Reimplemented from Controller.

Definition at line 109 of file MultipleActionController.php.