CommandMap

readonly class \TYPO3\CMS\Workspaces\DataHandler\CommandMap

Handles the \TYPO3\CMS\Core\DataHandling\DataHandler command map and is only used in combination with \TYPO3\CMS\Core\DataHandling\DataHandler

Table of Contents

Properties

$eventDispatcher  : EventDispatcherInterface

Methods

__construct()  : mixed
process()  : array
Processes the command map.
explodeSetStage()  : array
Explodes id-lists in the command map for staging actions.
getCommonClearProperties()  : array
Gets common properties of dependent elements for clearing.
getCommonSwapProperties()  : array
Gets common properties of dependent elements for swapping/publishing.
getSetStageProperties()  : array
Gets common properties of dependent elements for staging.
isLegacyDiscardCommand()  : bool
resolveWorkspacesDiscardDependencies()  : array
Resolves workspaces related dependencies for discarding of the command map.
resolveWorkspacesPublishDependencies()  : array
Resolves workspaces related dependencies for swapping/publishing of the command map.
resolveWorkspacesSetStageDependencies()  : array
Resolves workspaces related dependencies for staging of the command map.
transformDependentElementsToUseLiveId()  : array
Transforms dependent elements to use the liveId as array key.

Properties

$eventDispatcher

protected EventDispatcherInterface $eventDispatcher

Methods

__construct()

public __construct(EventDispatcherInterface $eventDispatcher) : mixed

Parameters

$eventDispatcher : EventDispatcherInterface

process()

Processes the command map.

public process(array $commandMap, int $workspace) : array

Parameters

$commandMap : array
$workspace : int

Return values

array

explodeSetStage()

Explodes id-lists in the command map for staging actions.

protected explodeSetStage(array $commandMap, string $table, string|int $versionIdList, array $properties) : array

Parameters

$commandMap : array
$table : string
$versionIdList : string|int
$properties : array

Return values

array

getCommonClearProperties()

Gets common properties of dependent elements for clearing.

protected getCommonClearProperties(ElementEntity $element) : array

Parameters

$element : ElementEntity

Return values

array

getCommonSwapProperties()

Gets common properties of dependent elements for swapping/publishing.

protected getCommonSwapProperties(ElementEntity $element) : array

Parameters

$element : ElementEntity

Return values

array

getSetStageProperties()

Gets common properties of dependent elements for staging.

protected getSetStageProperties(ElementEntity $element) : array

Parameters

$element : ElementEntity

Return values

array

isLegacyDiscardCommand()

protected isLegacyDiscardCommand(mixed $properties) : bool

Parameters

$properties : mixed

Return values

bool

resolveWorkspacesDiscardDependencies()

Resolves workspaces related dependencies for discarding of the command map.

protected resolveWorkspacesDiscardDependencies(array $commandMap, int $workspace) : array

Workspaces records that are children or (relative) parents of a discarded record and are delete placeholders, but not discarded with this request, are added to the command map.

Every element keeps the command it was requested with, and dependent elements pulled in by the resolver take the command of the element that was requested, so the native "discard" command is never turned into an empty "version" command.

Parameters

$commandMap : array
$workspace : int

Return values

array

resolveWorkspacesPublishDependencies()

Resolves workspaces related dependencies for swapping/publishing of the command map.

protected resolveWorkspacesPublishDependencies(array $commandMap, int $workspace) : array

Workspaces records that have children or (relative) parents which are versionized but not published with this request, are removed from the command map. Otherwise this would produce hanging record sets and lost references.

Parameters

$commandMap : array
$workspace : int

Return values

array

resolveWorkspacesSetStageDependencies()

Resolves workspaces related dependencies for staging of the command map.

protected resolveWorkspacesSetStageDependencies(array $commandMap, int $workspace) : array

Workspaces records that have children or (relative) parents which are versionized but not staged with this request, are removed from the command map.

Parameters

$commandMap : array
$workspace : int

Return values

array

transformDependentElementsToUseLiveId()

Transforms dependent elements to use the liveId as array key.

protected transformDependentElementsToUseLiveId(ElementEntity[] $elements) : array

Parameters

$elements : ElementEntity[]

Return values

array
On this page