TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ActionHandler Class Reference
Inheritance diagram for ActionHandler:
AbstractHandler

Public Member Functions

 __construct ()
 
 generateWorkspacePreviewLink ($uid)
 
 generateWorkspacePreviewLinksForAllLanguages ($uid)
 
 swapSingleRecord ($table, $t3ver_oid, $orig_uid)
 
 deleteSingleRecord ($table, $uid)
 
 viewSingleRecord ($table, $uid)
 
 executeSelectionAction ($parameter)
 
 saveColumnModel ($model)
 
 loadColumnModel ()
 
 saveLanguageSelection ($language)
 
 sendToNextStageWindow ($uid, $table, $t3ver_oid)
 
 sendToPrevStageWindow ($uid, $table)
 
 sendToSpecificStageWindow ($nextStageId, array $elements)
 
 getRecipientList (array $uidOfRecipients, $additionalRecipients, $stageId)
 
 sentCollectionToStage (\stdClass $parameters)
 
 sendToNextStageExecute (\stdClass $parameters)
 
 sendToPrevStageExecute (\stdClass $parameters)
 
 sendToSpecificStageExecute (\stdClass $parameters)
 
 sendPageToPreviousStage ($id)
 
 sendPageToNextStage ($id)
 
 updateStageChangeButtons ($id)
 

Protected Member Functions

 getPublishSwapCommands (array $selection, $swapIntoWorkspace)
 
 getFlushCommands (array $selection)
 
 getSentToStageWindow ($nextStage)
 
 getReceipientsOfStage ($stageRecord)
 
 getDefaultCommentOfStage ($stage)
 
 getStageService ()
 
 setTemporaryWorkspace ($workspaceId)
 
 getBackendUser ()
 
- Protected Member Functions inherited from AbstractHandler
 getCurrentWorkspace ()
 
 getErrorResponse ($errorLabel, $errorCode=0, $successFlagValue=false)
 
 getWorkspaceService ()
 
 validateLanguageParameter (\stdClass $parameters)
 
 getAffectedElements (\stdClass $parameters)
 

Protected Attributes

 $stageService
 

Detailed Description

ExtDirect action handler

Definition at line 26 of file ActionHandler.php.

Constructor & Destructor Documentation

__construct ( )

Creates this object.

Definition at line 36 of file ActionHandler.php.

References GeneralUtility\makeInstance().

Member Function Documentation

deleteSingleRecord (   $table,
  $uid 
)

Deletes a single record.

Parameters
string$table
int$uid
Returns
void
Todo:
What about reporting errors back to the ExtJS interface? /olly/

Definition at line 95 of file ActionHandler.php.

References BackendUtility\getRecord(), and ActionHandler\setTemporaryWorkspace().

executeSelectionAction (   $parameter)

Executes an action (publish, discard, swap) to a selection set.

Parameters
\stdClass$parameter
Returns
array

Definition at line 126 of file ActionHandler.php.

References elseif, ActionHandler\getFlushCommands(), and ActionHandler\getPublishSwapCommands().

generateWorkspacePreviewLink (   $uid)

Generates a workspace preview link.

Parameters
int$uidThe ID of the record to be linked
Returns
string the full domain including the protocol http:// or https://, but without the trailing '/'

Definition at line 47 of file ActionHandler.php.

References AbstractHandler\getWorkspaceService().

generateWorkspacePreviewLinksForAllLanguages (   $uid)

Generates workspace preview links for all available languages of a page.

Parameters
int$uid
Returns
array

Definition at line 58 of file ActionHandler.php.

References AbstractHandler\getWorkspaceService().

getBackendUser ( )
protected
Returns

Definition at line 859 of file ActionHandler.php.

References $GLOBALS.

Referenced by ActionHandler\setTemporaryWorkspace().

getDefaultCommentOfStage (   $stage)
protected

Gets the default comment of a particular stage.

Parameters
int$stage
Returns
string

Definition at line 744 of file ActionHandler.php.

References ActionHandler\getStageService().

getFlushCommands ( array  $selection)
protected

Get flush commands

Parameters
array|\stdClass[]$selection
Returns
array

Definition at line 174 of file ActionHandler.php.

Referenced by ActionHandler\executeSelectionAction().

getPublishSwapCommands ( array  $selection,
  $swapIntoWorkspace 
)
protected

Get publish swap commands

Parameters
array|\stdClass[]$selection
bool$swapIntoWorkspace
Returns
array

Definition at line 155 of file ActionHandler.php.

Referenced by ActionHandler\executeSelectionAction().

getReceipientsOfStage (   $stageRecord)
protected

Gets all assigned recipients of a particular stage.

Parameters
StageRecord | int$stageRecord
Returns
array

Definition at line 707 of file ActionHandler.php.

References WorkspaceRecord\get(), AbstractHandler\getCurrentWorkspace(), ActionHandler\getStageService(), and GeneralUtility\validEmail().

Referenced by ActionHandler\getSentToStageWindow().

getRecipientList ( array  $uidOfRecipients,
  $additionalRecipients,
  $stageId 
)

Gets a merged variant of recipient defined by uid and custom ones.

Parameters
array$uidOfRecipientslist of recipients
string$additionalRecipientsgiven user string of additional recipients
int$stageIdstage id
Returns
array
Exceptions
\InvalidArgumentException

Definition at line 337 of file ActionHandler.php.

References $GLOBALS, WorkspaceRecord\get(), AbstractHandler\getCurrentWorkspace(), BackendUtility\getRecord(), ActionHandler\getStageService(), GeneralUtility\trimExplode(), and GeneralUtility\validEmail().

Referenced by ActionHandler\sendToNextStageExecute(), ActionHandler\sendToPrevStageExecute(), ActionHandler\sendToSpecificStageExecute(), and ActionHandler\sentCollectionToStage().

getSentToStageWindow (   $nextStage)
protected

Gets the dialog window to be displayed before a record can be sent to a stage.

Parameters
StageRecord | int$nextStageId
Returns
array

Definition at line 654 of file ActionHandler.php.

References $GLOBALS, WorkspaceRecord\get(), AbstractHandler\getCurrentWorkspace(), and ActionHandler\getReceipientsOfStage().

Referenced by ActionHandler\sendPageToNextStage(), ActionHandler\sendPageToPreviousStage(), ActionHandler\sendToNextStageWindow(), ActionHandler\sendToPrevStageWindow(), and ActionHandler\sendToSpecificStageWindow().

getStageService ( )
protected
loadColumnModel ( )

Definition at line 204 of file ActionHandler.php.

References $GLOBALS.

saveColumnModel (   $model)

Saves the selected columns to be shown to the preferences of the current backend user.

Parameters
\stdClass$model
Returns
void

Definition at line 191 of file ActionHandler.php.

References $GLOBALS.

saveLanguageSelection (   $language)

Saves the selected language.

Parameters
int | string$language
Returns
void

Definition at line 219 of file ActionHandler.php.

References $GLOBALS.

sendPageToNextStage (   $id)
Parameters
int$idCurrent Page id to select Workspace items from.
Returns
array

Definition at line 788 of file ActionHandler.php.

References ActionHandler\getSentToStageWindow(), ActionHandler\getStageService(), and GeneralUtility\makeInstance().

sendPageToPreviousStage (   $id)

Send all available workspace records to the previous stage.

Parameters
int$idCurrent page id to process items to previous stage.
Returns
array

Definition at line 769 of file ActionHandler.php.

References ActionHandler\getSentToStageWindow(), ActionHandler\getStageService(), and GeneralUtility\makeInstance().

sendToNextStageExecute ( \stdClass  $parameters)

Gets an object with this structure:

affects: object table t3ver_oid nextStage uid receipients: array with uids additional: string comments: string

Parameters
stdClass$parameters
Returns
array

Definition at line 522 of file ActionHandler.php.

References ActionHandler\getRecipientList(), BackendUtility\getRecord(), ActionHandler\setTemporaryWorkspace(), and StagesService\STAGE_PUBLISH_EXECUTE_ID.

sendToNextStageWindow (   $uid,
  $table,
  $t3ver_oid 
)

Gets the dialog window to be displayed before a record can be sent to the next stage.

Parameters
int$uid
string$table
int$t3ver_oid
Returns
array

Definition at line 236 of file ActionHandler.php.

References WorkspaceRecord\get(), AbstractHandler\getErrorResponse(), BackendUtility\getRecord(), ActionHandler\getSentToStageWindow(), and ActionHandler\setTemporaryWorkspace().

sendToPrevStageExecute ( \stdClass  $parameters)

Gets an object with this structure:

affects: object table t3ver_oid nextStage receipients: array with uids additional: string comments: string

Parameters
stdClass$parameters
Returns
array

Definition at line 569 of file ActionHandler.php.

References ActionHandler\getRecipientList(), BackendUtility\getRecord(), and ActionHandler\setTemporaryWorkspace().

sendToPrevStageWindow (   $uid,
  $table 
)

Gets the dialog window to be displayed before a record can be sent to the previous stage.

Parameters
int$uid
string$table
Returns
array

Definition at line 271 of file ActionHandler.php.

References WorkspaceRecord\get(), AbstractHandler\getErrorResponse(), BackendUtility\getRecord(), ActionHandler\getSentToStageWindow(), and ActionHandler\setTemporaryWorkspace().

sendToSpecificStageExecute ( \stdClass  $parameters)

Gets an object with this structure:

affects: object elements: array 0: object table t3ver_oid uid 1: object table t3ver_oid uid nextStage recipients: array with uids additional: string comments: string

Parameters
\stdClass$parameters
Returns
array

Definition at line 615 of file ActionHandler.php.

References ActionHandler\getRecipientList(), BackendUtility\getRecord(), and StagesService\STAGE_PUBLISH_EXECUTE_ID.

sendToSpecificStageWindow (   $nextStageId,
array  $elements 
)

Gets the dialog window to be displayed before a record can be sent to a specific stage.

Parameters
int$nextStageId
array|\stdClass[]$elements
Returns
array

Definition at line 312 of file ActionHandler.php.

References ActionHandler\getSentToStageWindow().

sentCollectionToStage ( \stdClass  $parameters)

Push the given element collection to the next workspace stage.

$parameters->additional = your@.nosp@m.mail.nosp@m..com $parameters->affects->__TABLENAME__ $parameters->comments $parameters->receipients $parameters->stageId

Parameters
stdClass$parameters
Returns
array

Definition at line 443 of file ActionHandler.php.

References ActionHandler\getRecipientList(), and StagesService\STAGE_PUBLISH_EXECUTE_ID.

setTemporaryWorkspace (   $workspaceId)
protected
Parameters
int$workspaceId
Returns
int Id of the original workspace
Exceptions
\TYPO3\CMS\Core\Exception

Definition at line 839 of file ActionHandler.php.

References ActionHandler\getBackendUser().

Referenced by ActionHandler\deleteSingleRecord(), ActionHandler\sendToNextStageExecute(), ActionHandler\sendToNextStageWindow(), ActionHandler\sendToPrevStageExecute(), ActionHandler\sendToPrevStageWindow(), and ActionHandler\swapSingleRecord().

swapSingleRecord (   $table,
  $t3ver_oid,
  $orig_uid 
)

Swaps a single record.

Parameters
string$table
int$t3ver_oid
int$orig_uid
Returns
void
Todo:
What about reporting errors back to the ExtJS interface? /olly/

Definition at line 72 of file ActionHandler.php.

References BackendUtility\getRecord(), and ActionHandler\setTemporaryWorkspace().

updateStageChangeButtons (   $id)

Fetch the current label and visible state of the buttons.

Parameters
int$id
Returns
array Contains the visibility state and label of the stage change buttons.

Definition at line 809 of file ActionHandler.php.

References $GLOBALS, ActionHandler\$stageService, and GeneralUtility\makeInstance().

viewSingleRecord (   $table,
  $uid 
)

Generates a view link for a page.

Parameters
string$table
string$uid
Returns
string

Definition at line 115 of file ActionHandler.php.

Member Data Documentation

$stageService
protected