The Inx_Api_Action_ActionManager manages all actions.
The Inx_Api_Action_ActionManager manages all actions. The following snippet creates a new Action that sets the lastClick recipient attribute (last time the recipient clicked a link) to the current date and increments the clickCount recipient attribute (the number of clicks by the recipient):
$oListContextManager = $oSession->getListContextManager(); $oListContext = $oListContextManager->findByName( Inx_Api_List_SystemListContext::NAME ); $oRecipientMetaData = $session->createRecipientContext()->getMetaData(); $iLastClick = $oRecipientMetaData->getUserAttribute( "lastClick" )->getId(); $iClickCount = $oRecipientMetaData->getUserAttribute( "clickCount" )->getId(); $oActionMgr = $oSession->getActionManager(); $oAction = $oActionMgr->createAction( $oListContext ); $oAction->updateEventType( Inx_Api_Action_Action::EVENT_TYPE_CLICK ); $oAction->updateName( "Click-Registry" ); $oCommandFactory = $oActionMgr->getCommandFactory(); $aCmds = array(); $aCmds[] = $oCommandFactory->createSetValueCmd( $iLastClick, "=Date()" ); $aCmds[] = $oCommandFactory->createSetRelativeValueCmd( $iClickCount, 1 ); $oAction->updateCommands( $aCmds ); $oAction->commitUpdate();Note: The recipient attributes referenced in the snippet are not standard attributes and must be created using the Inx_Api_Recipient_AttributeManager before they may be used in the shown way.
Note: The usage of Inx_Api_Action_Actions requires the api user right: Inx_Api_UserRights::ACTION_FEATURE_USE
For more information on actions (including event types), see the Inx_Api_Action_Action documentation.
Located in /Api/Action/ActionManager.php (line 50)
Inx_Api_BOManager | --Inx_Api_Action_ActionManager
Creates a new, empty action with the specified owning list.
Creates a new, empty action with the specified owning list. If the action is not list specific, the system list context must be used. The following snippet retrieves the system list context:
$oListContextManager = $oSession->getListContextManager(); $oListContext = $oListContextManager->findByName( Inx_Api_List_SystemListContext::NAME );
Returns the factory used to create new commands.
Returns the factory used to create new commands. Inx_Api_Action_Commands are executed by an Inx_Api_Action if the event associated with that action is triggered.
Selects all actions owned by the specified list context.
Selects all actions owned by the specified list context. To retrieve actions which are not list specific, use the system list context. The following snippet retrieves the system list context:
$oListContextManager = $oSession->getListContextManager(); $oListContext = $oListContextManager->findByName( Inx_Api_List_SystemListContext::NAME );
Inherited From Inx_Api_BOManager
Inx_Api_BOManager::get()
Inx_Api_BOManager::remove()
Inx_Api_BOManager::selectAll()
Documentation generated on Thu, 17 Sep 2015 14:27:20 +0200 by phpDocumentor 1.3.2