‪TYPO3CMS  10.4
TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler Class Reference

Public Member Functions

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

Protected Member Functions

array getPublishSwapCommands (array $selection, $swapIntoWorkspace)
 
array getFlushCommands (array $selection)
 
array processTcaCmd (array $cmdMapArray)
 
array getSentToStageWindow ($nextStage)
 
array getRecipientsOfStage ($stageRecord)
 
string getDefaultCommentOfStage ($stage)
 
BackendUserAuthentication getBackendUser ()
 
LanguageService getLanguageService ()
 
array getErrorResponse ($errorLabel, $errorCode=0, $successFlagValue=false)
 
int getCurrentWorkspace ()
 

Protected Attributes

StagesService $stageService
 
WorkspaceService $workspaceService
 

Detailed Description

This is a specific Backend Controller implementation and is not considered part of the Public TYPO3 API.

Definition at line 35 of file ActionHandler.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::__construct ( )

Creates this object.

Definition at line 48 of file ActionHandler.php.

Member Function Documentation

◆ deleteSingleRecord()

TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::deleteSingleRecord (   $table,
  $uid 
)

Deletes a single record.

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

Definition at line 102 of file ActionHandler.php.

References TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\processTcaCmd().

◆ discardStagesFromPage()

array TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::discardStagesFromPage (   $pageId)

Discard all items from given page id.

Parameters
int$pageId
Returns
‪array

Definition at line 405 of file ActionHandler.php.

References TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\processTcaCmd().

◆ executeSelectionAction()

array TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::executeSelectionAction (   $parameter)

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

Parameters
\stdClass$parameter
Returns
‪array

Definition at line 129 of file ActionHandler.php.

References TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getFlushCommands(), TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getPublishSwapCommands(), and TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\processTcaCmd().

◆ generateWorkspacePreviewLink()

string TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::generateWorkspacePreviewLink (   $uid)

Generates a workspace preview link.

Parameters
int$uid‪The 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 60 of file ActionHandler.php.

◆ generateWorkspacePreviewLinksForAllLanguages()

array TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::generateWorkspacePreviewLinksForAllLanguages (   $uid)

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

Parameters
int$uid
Returns
‪array

Definition at line 71 of file ActionHandler.php.

◆ getBackendUser()

BackendUserAuthentication TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::getBackendUser ( )
protected

◆ getCurrentWorkspace()

int TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::getCurrentWorkspace ( )
protected

◆ getDefaultCommentOfStage()

string TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::getDefaultCommentOfStage (   $stage)
protected

Gets the default comment of a particular stage.

Parameters
int$stage
Returns
‪string

Definition at line 709 of file ActionHandler.php.

◆ getErrorResponse()

array TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::getErrorResponse (   $errorLabel,
  $errorCode = 0,
  $successFlagValue = false 
)
protected

Gets an error response to be shown in the grid component.

Parameters
string$errorLabel‪Name of the label in the locallang.xlf file
int$errorCode‪The error code to be used
bool$successFlagValue‪Value of the success flag to be delivered back (might be FALSE in most cases)
Returns
‪array

Definition at line 847 of file ActionHandler.php.

References TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getLanguageService(), and TYPO3\CMS\Core\Localization\LanguageService\sL().

Referenced by TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sendToNextStageWindow(), and TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sendToPrevStageWindow().

◆ getFlushCommands()

array TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::getFlushCommands ( array  $selection)
protected

Get flush commands

Parameters
array | \stdClass[]$selection
Returns
‪array

Definition at line 177 of file ActionHandler.php.

Referenced by TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\executeSelectionAction().

◆ getLanguageService()

LanguageService TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::getLanguageService ( )
protected

◆ getPublishSwapCommands()

array TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::getPublishSwapCommands ( array  $selection,
  $swapIntoWorkspace 
)
protected

Get publish swap commands

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

Definition at line 158 of file ActionHandler.php.

Referenced by TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\executeSelectionAction().

◆ getRecipientList()

array TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::getRecipientList ( array  $uidOfRecipients,
  $additionalRecipients,
  $stageId 
)

◆ getRecipientsOfStage()

array TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::getRecipientsOfStage (   $stageRecord)
protected

◆ getSentToStageWindow()

◆ loadColumnModel()

TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::loadColumnModel ( )

◆ processTcaCmd()

◆ saveColumnModel()

TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::saveColumnModel (   $model)

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

Parameters
\stdClass$model

Definition at line 193 of file ActionHandler.php.

References TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getBackendUser(), and TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\writeUC().

◆ saveLanguageSelection()

TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::saveLanguageSelection (   $language)

◆ sendPageToNextStage()

array TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::sendPageToNextStage (   $id)
Parameters
int$id‪Current Page id to select Workspace items from.
Returns
‪array

Definition at line 755 of file ActionHandler.php.

References TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getSentToStageWindow().

◆ sendPageToPreviousStage()

array TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::sendPageToPreviousStage (   $id)

Send all available workspace records to the previous stage.

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

Definition at line 721 of file ActionHandler.php.

References TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getSentToStageWindow().

◆ sendToNextStageExecute()

array TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::sendToNextStageExecute ( \stdClass  $parameters)

Gets an object with this structure:

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

Parameters
\stdClass$parameters
Returns
‪array

Definition at line 519 of file ActionHandler.php.

References TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\processTcaCmd(), and TYPO3\CMS\Workspaces\Service\StagesService\STAGE_PUBLISH_EXECUTE_ID.

◆ sendToNextStageWindow()

array TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::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 TYPO3\CMS\Workspaces\Domain\Record\WorkspaceRecord\get(), TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getErrorResponse(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), and TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getSentToStageWindow().

◆ sendToPrevStageExecute()

array TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::sendToPrevStageExecute ( \stdClass  $parameters)

Gets an object with this structure:

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

Parameters
\stdClass$parameters
Returns
‪array

Definition at line 562 of file ActionHandler.php.

References TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getRecipientList(), and TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\processTcaCmd().

◆ sendToPrevStageWindow()

array TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::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 267 of file ActionHandler.php.

References TYPO3\CMS\Workspaces\Domain\Record\WorkspaceRecord\get(), TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getErrorResponse(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), and TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getSentToStageWindow().

◆ sendToSpecificStageExecute()

array TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::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 604 of file ActionHandler.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\processTcaCmd(), and TYPO3\CMS\Workspaces\Service\StagesService\STAGE_PUBLISH_EXECUTE_ID.

◆ sendToSpecificStageWindow()

array TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::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 304 of file ActionHandler.php.

References TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getSentToStageWindow().

◆ sentCollectionToStage()

array TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::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->recipients $parameters->stageId

Parameters
\stdClass$parameters
Returns
‪array

Definition at line 441 of file ActionHandler.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getRecipientList(), TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\processTcaCmd(), and TYPO3\CMS\Workspaces\Service\StagesService\STAGE_PUBLISH_EXECUTE_ID.

◆ swapSingleRecord()

TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::swapSingleRecord (   $table,
  $t3ver_oid,
  $orig_uid 
)

Swaps a single record.

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

Definition at line 84 of file ActionHandler.php.

References TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\processTcaCmd().

◆ updateStageChangeButtons()

string TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::updateStageChangeButtons (   $id)

Fetch the current label and visible state of the buttons.

Parameters
int$id
Returns
‪string The pre-rendered HTML for the stage buttons

Definition at line 790 of file ActionHandler.php.

References TYPO3\CMS\Core\Utility\ExtensionManagementUtility\extPath().

◆ viewSingleRecord()

string TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::viewSingleRecord (   $table,
  $uid 
)

Generates a view link for a page.

Parameters
string$table
string$uid
Returns
‪string

Definition at line 118 of file ActionHandler.php.

Member Data Documentation

◆ $stageService

StagesService TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::$stageService
protected

Definition at line 39 of file ActionHandler.php.

◆ $workspaceService

WorkspaceService TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::$workspaceService
protected

Definition at line 43 of file ActionHandler.php.