CommandMap

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

Constants

KEY_ElementConstructCallback  : mixed = 'KEY_EventConstructCallback'
KEY_ElementCreateChildReferenceCallback  : mixed = 'KEY_ElementCreateChildReferenceCallback'
KEY_ElementCreateParentReferenceCallback  : mixed = 'KEY_ElementCreateParentReferenceCallback'
KEY_GetCommonPropertiesCallback  : mixed = 'KEY_GetCommonPropertiesCallback'
KEY_GetElementPropertiesCallback  : mixed = 'KEY_GetElementPropertiesCallback'
KEY_TransformDependentElementsToUseLiveId  : mixed = 'KEY_TransformDependentElementsToUseLiveId'
KEY_UpdateGetIdCallback  : mixed = 'KEY_UpdateGetIdCallback'
SCOPE_WorkspacesClear  : mixed = 'SCOPE_WorkspacesClear'
SCOPE_WorkspacesSetStage  : mixed = 'SCOPE_WorkspacesSetStage'
SCOPE_WorkspacesSwap  : mixed = 'SCOPE_WorkspacesSwap'

Properties

$commandMap  : array
$elementEntityProcessor  : ElementEntityProcessor|null
$parent  : DataHandlerHook
$scopes  : array
$tceMain  : DataHandler
$workspace  : int
$workspacesChangeStageMode  : string
$workspacesSwapMode  : string

Methods

__construct()  : mixed
Creates this object.
get()  : array
Gets the command map.
getParent()  : DataHandlerHook
Gets the parent object.
getTceMain()  : DataHandler
Gets the parent object.
getWorkspace()  : int
Gets the current workspace.
process()  : CommandMap
Processes the command map.
set()  : CommandMap
Sets the command map.
setParent()  : CommandMap
Sets the parent object.
setTceMain()  : CommandMap
Sets the parent object.
setWorkspace()  : mixed
Sets the current workspace.
setWorkspacesChangeStageMode()  : CommandMap
Sets the workspaces change stage mode see options.workspaces.changeStageMode)
setWorkspacesSwapMode()  : CommandMap
Sets the workspaces swap mode (see options.workspaces.swapMode).
addWorkspacesSetStageElements()  : mixed
Adds workspaces elements for staging.
addWorkspacesSwapElements()  : mixed
Adds workspaces elements for swapping/publishing.
applyWorkspacesDependencies()  : mixed
Applies the workspaces dependencies and removes incomplete structures or automatically completes them
applyWorkspacesSetStageBehaviour()  : mixed
Applies workspaces behaviour for staging and takes care of the changeStageMode.
applyWorkspacesSwapBehaviour()  : mixed
Applies workspaces behaviour for swapping/publishing and takes care of the swapMode.
constructScopes()  : mixed
Constructs the scope settings.
explodeSetStage()  : mixed
Explodes id-lists in the command map for staging actions.
getCommonClearPropertiesCallback()  : array
Callback to get common properties of dependent elements for clearing.
getCommonSetStagePropertiesCallback()  : array
Callback to get common properties of dependent elements for staging.
getCommonSwapPropertiesCallback()  : array
Callback to get common properties of dependent elements for swapping/publishing.
getDependencyCallback()  : EventCallback
Gets a new callback to be used in the dependency resolver utility.
getDependencyUtility()  : DependencyResolver
Gets an instance of the dependency resolver utility.
getElementEntityProcessor()  : ElementEntityProcessor
Gets the element entity processor.
getElementIdCallback()  : int
Callback to get the real id of a dependent element.
getElementLiveIdCallback()  : int
Callback to get the liveId of a dependent element.
getElementSetStagePropertiesCallback()  : array
Callback to get the specific properties of a dependent element for staging.
getElementSwapPropertiesCallback()  : array
Callback to get the specific properties of a dependent element for swapping/publishing.
getScopeData()  : string
Gets data for a particular scope.
invokeWorkspacesSetStageItems()  : mixed
Invokes all items for staging with a callback method.
invokeWorkspacesSwapItems()  : mixed
Invokes all items for swapping/publishing with a callback method.
mergeToBottom()  : mixed
Merges command map elements to the bottom of the current command map.
mergeToTop()  : mixed
Merges command map elements to the top of the current command map.
processCallback()  : mixed
Processes a local callback inside this object.
remove()  : mixed
Removes an element from the command map.
resolveWorkspacesClearDependencies()  : mixed
Resolves workspaces related dependencies for clearing/flushing of the command map.
resolveWorkspacesSetStageDependencies()  : mixed
Resolves workspaces related dependencies for staging of the command map.
resolveWorkspacesSwapDependencies()  : mixed
Resolves workspaces related dependencies for swapping/publishing of the command map.
update()  : mixed
Updates the command map accordant to valid structures and takes care of the correct order.

Constants

KEY_ElementConstructCallback

public mixed KEY_ElementConstructCallback = 'KEY_EventConstructCallback'

KEY_ElementCreateChildReferenceCallback

public mixed KEY_ElementCreateChildReferenceCallback = 'KEY_ElementCreateChildReferenceCallback'

KEY_ElementCreateParentReferenceCallback

public mixed KEY_ElementCreateParentReferenceCallback = 'KEY_ElementCreateParentReferenceCallback'

KEY_GetCommonPropertiesCallback

public mixed KEY_GetCommonPropertiesCallback = 'KEY_GetCommonPropertiesCallback'

KEY_GetElementPropertiesCallback

public mixed KEY_GetElementPropertiesCallback = 'KEY_GetElementPropertiesCallback'

KEY_TransformDependentElementsToUseLiveId

public mixed KEY_TransformDependentElementsToUseLiveId = 'KEY_TransformDependentElementsToUseLiveId'

KEY_UpdateGetIdCallback

public mixed KEY_UpdateGetIdCallback = 'KEY_UpdateGetIdCallback'

SCOPE_WorkspacesClear

public mixed SCOPE_WorkspacesClear = 'SCOPE_WorkspacesClear'

SCOPE_WorkspacesSetStage

public mixed SCOPE_WorkspacesSetStage = 'SCOPE_WorkspacesSetStage'

SCOPE_WorkspacesSwap

public mixed SCOPE_WorkspacesSwap = 'SCOPE_WorkspacesSwap'

Properties

$commandMap

protected array $commandMap = []

$workspacesChangeStageMode

protected string $workspacesChangeStageMode

$workspacesSwapMode

protected string $workspacesSwapMode

Methods

get()

Gets the command map.

public get() : array

Return values

array

getWorkspace()

Gets the current workspace.

public getWorkspace() : int

Return values

int

setWorkspace()

Sets the current workspace.

public setWorkspace(int $workspace) : mixed

Parameters

$workspace : int

setWorkspacesChangeStageMode()

Sets the workspaces change stage mode see options.workspaces.changeStageMode)

public setWorkspacesChangeStageMode(string $workspacesChangeStageMode) : CommandMap

Parameters

$workspacesChangeStageMode : string

Return values

CommandMap

setWorkspacesSwapMode()

Sets the workspaces swap mode (see options.workspaces.swapMode).

public setWorkspacesSwapMode(string $workspacesSwapMode) : CommandMap

Parameters

$workspacesSwapMode : string

Return values

CommandMap

addWorkspacesSetStageElements()

Adds workspaces elements for staging.

protected addWorkspacesSetStageElements(DependencyResolver $dependency, string $table, int $versionId, array $properties) : mixed

Parameters

$dependency : DependencyResolver
$table : string
$versionId : int
$properties : array

addWorkspacesSwapElements()

Adds workspaces elements for swapping/publishing.

protected addWorkspacesSwapElements(DependencyResolver $dependency, string $table, int $liveId, array $properties) : mixed

Parameters

$dependency : DependencyResolver
$table : string
$liveId : int
$properties : array

applyWorkspacesDependencies()

Applies the workspaces dependencies and removes incomplete structures or automatically completes them

protected applyWorkspacesDependencies(DependencyResolver $dependency, string $scope) : mixed

Parameters

$dependency : DependencyResolver
$scope : string

applyWorkspacesSetStageBehaviour()

Applies workspaces behaviour for staging and takes care of the changeStageMode.

protected applyWorkspacesSetStageBehaviour(string $table, string $versionIdList, array $properties) : mixed

Parameters

$table : string
$versionIdList : string
$properties : array

applyWorkspacesSwapBehaviour()

Applies workspaces behaviour for swapping/publishing and takes care of the swapMode.

protected applyWorkspacesSwapBehaviour(string $table, int $liveId, array $properties) : mixed

Parameters

$table : string
$liveId : int
$properties : array

constructScopes()

Constructs the scope settings.

protected constructScopes() : mixed

Currently the scopes for swapping/publishing and staging are available.

explodeSetStage()

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

protected explodeSetStage(string $table, string $versionIdList, array $properties) : mixed

Parameters

$table : string
$versionIdList : string
$properties : array

Tags

throws
RuntimeException

getCommonClearPropertiesCallback()

Callback to get common properties of dependent elements for clearing.

protected getCommonClearPropertiesCallback(ElementEntity $element) : array

Parameters

$element : ElementEntity

Return values

array

getCommonSetStagePropertiesCallback()

Callback to get common properties of dependent elements for staging.

protected getCommonSetStagePropertiesCallback(ElementEntity $element) : array

Parameters

$element : ElementEntity

Return values

array

getCommonSwapPropertiesCallback()

Callback to get common properties of dependent elements for swapping/publishing.

protected getCommonSwapPropertiesCallback(ElementEntity $element) : array

Parameters

$element : ElementEntity

Return values

array

getDependencyCallback()

Gets a new callback to be used in the dependency resolver utility.

protected getDependencyCallback(string $method[, array $targetArguments = [] ]) : EventCallback

Parameters

$method : string
$targetArguments : array = []

Return values

EventCallback

getElementIdCallback()

Callback to get the real id of a dependent element.

protected getElementIdCallback(ElementEntity $element) : int

Parameters

$element : ElementEntity

Return values

int

getElementLiveIdCallback()

Callback to get the liveId of a dependent element.

protected getElementLiveIdCallback(ElementEntity $element) : int

Parameters

$element : ElementEntity

Return values

int

getElementSetStagePropertiesCallback()

Callback to get the specific properties of a dependent element for staging.

protected getElementSetStagePropertiesCallback(ElementEntity $element) : array

Parameters

$element : ElementEntity

Return values

array

getElementSwapPropertiesCallback()

Callback to get the specific properties of a dependent element for swapping/publishing.

protected getElementSwapPropertiesCallback(ElementEntity $element) : array

Parameters

$element : ElementEntity

Return values

array

getScopeData()

Gets data for a particular scope.

protected getScopeData(string $scope, string $key) : string

Parameters

$scope : string

Scope identifier

$key : string

Tags

throws
RuntimeException

Return values

string

invokeWorkspacesSetStageItems()

Invokes all items for staging with a callback method.

protected invokeWorkspacesSetStageItems(string $callbackMethod[, array $arguments = [] ]) : mixed

Parameters

$callbackMethod : string
$arguments : array = []

Optional leading arguments for the callback method

invokeWorkspacesSwapItems()

Invokes all items for swapping/publishing with a callback method.

protected invokeWorkspacesSwapItems(string $callbackMethod[, array $arguments = [] ]) : mixed

Parameters

$callbackMethod : string
$arguments : array = []

Optional leading arguments for the callback method

mergeToBottom()

Merges command map elements to the bottom of the current command map.

protected mergeToBottom(array $commandMap) : mixed

Parameters

$commandMap : array

mergeToTop()

Merges command map elements to the top of the current command map.

protected mergeToTop(array $commandMap) : mixed

.

Parameters

$commandMap : array

processCallback()

Processes a local callback inside this object.

protected processCallback(string $method, array $callbackArguments) : mixed

Parameters

$method : string
$callbackArguments : array

remove()

Removes an element from the command map.

protected remove(string $table, string $id[, string $command = null ]) : mixed

Parameters

$table : string
$id : string
$command : string = null

(optional)

resolveWorkspacesClearDependencies()

Resolves workspaces related dependencies for clearing/flushing of the command map.

protected resolveWorkspacesClearDependencies() : mixed

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

resolveWorkspacesSetStageDependencies()

Resolves workspaces related dependencies for staging of the command map.

protected resolveWorkspacesSetStageDependencies() : mixed

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

resolveWorkspacesSwapDependencies()

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

protected resolveWorkspacesSwapDependencies() : mixed

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.

update()

Updates the command map accordant to valid structures and takes care of the correct order.

protected update(ElementEntity $intersectingElement, array $elements, string $scope) : mixed

Parameters

$intersectingElement : ElementEntity
$elements : array
$scope : string
On this page