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

Public Member Functions

 __construct (protected readonly StagesService $stagesService, protected readonly WorkspaceService $workspaceService, protected readonly BackendViewFactory $backendViewFactory,)
 
string generateWorkspacePreviewLink ($uid)
 
array generateWorkspacePreviewLinksForAllLanguages ($uid)
 
 publishSingleRecord ($table, $t3ver_oid, $orig_uid)
 
 deleteSingleRecord ($table, $uid)
 
string viewSingleRecord ($table, $uid)
 
array executeSelectionAction ($parameter)
 
 saveColumnModel ($model)
 
 loadColumnModel ()
 
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)
 
 updateStageChangeButtons (int $id, ServerRequestInterface $request)
 

Protected Member Functions

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

Detailed Description

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

Definition at line 37 of file ActionHandler.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::__construct ( protected readonly StagesService  $stagesService,
protected readonly WorkspaceService  $workspaceService,
protected readonly BackendViewFactory  $backendViewFactory 
)

Definition at line 39 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 92 of file ActionHandler.php.

References TYPO3\CMS\Webhooks\Message\$uid, and 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 382 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) to a selection set.

Parameters
\stdClass$parameter
Returns
‪array

Definition at line 119 of file ActionHandler.php.

References TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getFlushCommands(), TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getPublishCommands(), 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 51 of file ActionHandler.php.

References TYPO3\CMS\Webhooks\Message\$uid.

◆ 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 62 of file ActionHandler.php.

References TYPO3\CMS\Webhooks\Message\$uid.

◆ getBackendUser()

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 685 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 793 of file ActionHandler.php.

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

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 164 of file ActionHandler.php.

References TYPO3\CMS\Webhooks\Message\$record.

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

◆ getLanguageService()

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

◆ getPublishCommands()

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

Get publish commands

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

Definition at line 146 of file ActionHandler.php.

References TYPO3\CMS\Webhooks\Message\$record.

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

◆ getRecipientList()

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

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

Parameters
array$uidOfRecipients‪list of recipients
string$additionalRecipients‪given user string of additional recipients
int$stageId‪stage id
Returns
‪array
Exceptions

Definition at line 307 of file ActionHandler.php.

References TYPO3\CMS\Workspaces\Domain\Record\WorkspaceRecord\get(), TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getCurrentWorkspace(), TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getLanguageService(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sendToPrevStageExecute(), and TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sentCollectionToStage().

◆ getRecipientsOfStage()

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

Gets all assigned recipients of a particular stage.

Parameters
StageRecord | int$stageRecord
Returns
‪array

Definition at line 647 of file ActionHandler.php.

References TYPO3\CMS\Workspaces\Domain\Record\WorkspaceRecord\get(), and TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getCurrentWorkspace().

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

◆ getSentToStageWindow()

◆ loadColumnModel()

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

◆ processTcaCmd()

◆ publishSingleRecord()

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

Publishes 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 75 of file ActionHandler.php.

References TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\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
array<

Definition at line 180 of file ActionHandler.php.

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

◆ 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 729 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 697 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 494 of file ActionHandler.php.

References TYPO3\CMS\Webhooks\Message\$uid, 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 209 of file ActionHandler.php.

References TYPO3\CMS\Webhooks\Message\$uid, TYPO3\CMS\Workspaces\Domain\Record\WorkspaceRecord\get(), TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getErrorResponse(), 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 537 of file ActionHandler.php.

References TYPO3\CMS\Webhooks\Message\$uid, 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 241 of file ActionHandler.php.

References TYPO3\CMS\Webhooks\Message\$uid, TYPO3\CMS\Workspaces\Domain\Record\WorkspaceRecord\get(), TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getErrorResponse(), 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 579 of file ActionHandler.php.

References 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 282 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 417 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.

◆ updateStageChangeButtons()

TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler::updateStageChangeButtons ( int  $id,
ServerRequestInterface  $request 
)

Fetch the current label and visible state of the stage buttons. Used when records have been pushed to different stages in the preview module to update the button phalanx.

Definition at line 760 of file ActionHandler.php.

◆ 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 108 of file ActionHandler.php.

References TYPO3\CMS\Webhooks\Message\$uid.