wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
MultipleActionController Class Reference
+ Inheritance diagram for MultipleActionController:

Public Member Functions

 validate ()
 
 hasView ()
 
 executeKernel ()
 
 replaceVariables (&$data)
 
 replaceVariablesString ($value)
 
- Public Member Functions inherited from Controller
 Controller (&$delegate)
 
 initialize (&$request, &$response)
 
 validate ()
 
 hasView ()
 
 execute ()
 
 executeKernel ()
 
 getErrorMsg ()
 
 setErrorMsg ($msg)
 
 appendErrorMsg ($msg)
 
getRequest ()
 
getResponse ()
 
getView ()
 
getDelegate ()
 
 getViewTemplate ($controller, $context, $action)
 
 getCacheId ()
 
 assignViewDefaults (&$view)
 
 isLocalizedRequest ()
 

Additional Inherited Members

- Public Attributes inherited from Controller
 $_request = null
 
 $_response = null
 
 $_errorMsg = ''
 
 $_view = null
 
 $_delegate = null
 

Detailed Description

MultipleActionController is a controller that executes multiple actions by passing them do the appropriate controllers and returning all results as once.

wCMF - wemove Content Management Framework Copyright (C) 2005 wemove digital solutions GmbH

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Id:
class.MultipleActionController.php 1427 2012-12-21 19:03:06Z iherwig

Input actions:

  • unspecified: Execute the given actions

Output actions:

  • ok In any case
Parameters
[in]dataAn associative array with unique/sortable keys and values that describe an action to perform
[out]dataAn associative array with the same keys and values that describe the resonse of each action

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: {
usr_action: "new",
type: "ChiGoal"
}
action2: {
usr_action: "display",
oid: {last_created_oid:ChiGoal},
omitMetaData: true
}
}

The output data for the preceding request could look like

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

Definition at line 82 of file class.MultipleActionController.php.

Member Function Documentation

MultipleActionController::validate ( )
See Also
Controller::validate()

Definition at line 87 of file class.MultipleActionController.php.

References Controller\setErrorMsg().

+ Here is the call graph for this function:

MultipleActionController::hasView ( )
See Also
Controller::hasView()

Definition at line 104 of file class.MultipleActionController.php.

MultipleActionController::executeKernel ( )

(Dis-)Associate the Nodes.

Returns
Array of given context and action 'ok' in every case.
See Also
Controller::executeKernel()

Definition at line 113 of file class.MultipleActionController.php.

References $GLOBALS, Log\debug(), Log\error(), ApplicationException\getCodeString(), StringUtil\getDump(), SessionData\getInstance(), ApplicationException\getResponse(), Log\isDebugEnabled(), ActionMapper\processAction(), and replaceVariables().

+ Here is the call graph for this function:

MultipleActionController::replaceVariables ( $data)

Check the given data array for special variables to replace Variables have either the form 'variable_name' or 'variable_name:column_separated_parameters'

Parameters
dataA reference to the associative data array

Definition at line 197 of file class.MultipleActionController.php.

References Log\debug(), Log\isDebugEnabled(), and replaceVariablesString().

Referenced by executeKernel().

+ Here is the call graph for this function:

MultipleActionController::replaceVariablesString (   $value)

Check the given string for special variables to replace Variables have either the form 'variable_name' or 'variable_name:column_separated_parameters'

Parameters
valueThe string
Returns
The string

Definition at line 231 of file class.MultipleActionController.php.

References PersistenceFacade\getInstance(), and PersistenceFacade\isKnownType().

Referenced by replaceVariables().

+ Here is the call graph for this function:


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