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  = 'KEY_EventConstructCallback'
KEY_ElementCreateChildReferenceCallback  = 'KEY_ElementCreateChildReferenceCallback'
KEY_ElementCreateParentReferenceCallback  = 'KEY_ElementCreateParentReferenceCallback'
KEY_GetCommonPropertiesCallback  = 'KEY_GetCommonPropertiesCallback'
KEY_GetElementPropertiesCallback  = 'KEY_GetElementPropertiesCallback'
KEY_TransformDependentElementsToUseLiveId  = 'KEY_TransformDependentElementsToUseLiveId'
KEY_UpdateGetIdCallback  = 'KEY_UpdateGetIdCallback'
SCOPE_WorkspacesClear  = 'SCOPE_WorkspacesClear'
SCOPE_WorkspacesSetStage  = 'SCOPE_WorkspacesSetStage'
SCOPE_WorkspacesSwap  = 'SCOPE_WorkspacesSwap'

Properties

$commandMap  : array<string|int, mixed>
$elementEntityProcessor  : ElementEntityProcessor|null
$scopes  : array<string|int, mixed>
$workspace  : int

Methods

__construct()  : mixed
Creates this object.
get()  : array<string|int, mixed>
Gets the command map.
getWorkspace()  : int
Gets the current workspace.
process()  : CommandMap
Processes the command map.
set()  : CommandMap
Sets the command map.
setWorkspace()  : mixed
Sets the current workspace.
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
constructScopes()  : mixed
Constructs the scope settings.
explodeSetStage()  : mixed
Explodes id-lists in the command map for staging actions.
getCommonClearPropertiesCallback()  : array<string|int, mixed>
Callback to get common properties of dependent elements for clearing.
getCommonSetStagePropertiesCallback()  : array<string|int, mixed>
Callback to get common properties of dependent elements for staging.
getCommonSwapPropertiesCallback()  : array<string|int, mixed>
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<string|int, mixed>
Callback to get the specific properties of a dependent element for staging.
getElementSwapPropertiesCallback()  : array<string|int, mixed>
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.
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<string|int, mixed> $commandMap = []

$scopes

protected array<string|int, mixed> $scopes

Methods

__construct()

Creates this object.

public __construct(array<string|int, mixed> $commandMap, int $workspace) : mixed
Parameters
$commandMap : array<string|int, mixed>
$workspace : int

get()

Gets the command map.

public get() : array<string|int, mixed>
Return values
array<string|int, mixed>

getWorkspace()

Gets the current workspace.

public getWorkspace() : int
Return values
int

set()

Sets the command map.

public set(array<string|int, mixed> $commandMap) : CommandMap
Parameters
$commandMap : array<string|int, mixed>
Return values
CommandMap

setWorkspace()

Sets the current workspace.

public setWorkspace(int $workspace) : mixed
Parameters
$workspace : int

addWorkspacesSetStageElements()

Adds workspaces elements for staging.

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

addWorkspacesSwapElements()

Adds workspaces elements for swapping/publishing.

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

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

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<string|int, mixed> $properties) : mixed
Parameters
$table : string
$versionIdList : string
$properties : array<string|int, mixed>
Tags
throws
RuntimeException

getCommonClearPropertiesCallback()

Callback to get common properties of dependent elements for clearing.

protected getCommonClearPropertiesCallback(ElementEntity $element) : array<string|int, mixed>
Parameters
$element : ElementEntity
Return values
array<string|int, mixed>

getCommonSetStagePropertiesCallback()

Callback to get common properties of dependent elements for staging.

protected getCommonSetStagePropertiesCallback(ElementEntity $element) : array<string|int, mixed>
Parameters
$element : ElementEntity
Return values
array<string|int, mixed>

getCommonSwapPropertiesCallback()

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

protected getCommonSwapPropertiesCallback(ElementEntity $element) : array<string|int, mixed>
Parameters
$element : ElementEntity
Return values
array<string|int, mixed>

getDependencyCallback()

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

protected getDependencyCallback(string $method[, array<string|int, mixed> $targetArguments = [] ]) : EventCallback
Parameters
$method : string
$targetArguments : array<string|int, mixed> = []
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<string|int, mixed>
Parameters
$element : ElementEntity
Return values
array<string|int, mixed>

getElementSwapPropertiesCallback()

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

protected getElementSwapPropertiesCallback(ElementEntity $element) : array<string|int, mixed>
Parameters
$element : ElementEntity
Return values
array<string|int, mixed>

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<string|int, mixed> $arguments = [] ]) : mixed
Parameters
$callbackMethod : string
$arguments : array<string|int, mixed> = []

Optional leading arguments for the callback method

mergeToBottom()

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

protected mergeToBottom(array<string|int, mixed> $commandMap) : mixed
Parameters
$commandMap : array<string|int, mixed>

mergeToTop()

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

protected mergeToTop(array<string|int, mixed> $commandMap) : mixed

.

Parameters
$commandMap : array<string|int, mixed>

processCallback()

Processes a local callback inside this object.

protected processCallback(string $method, array<string|int, mixed> $callbackArguments) : mixed
Parameters
$method : string
$callbackArguments : array<string|int, mixed>

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<string|int, mixed> $elements, string $scope) : mixed
Parameters
$intersectingElement : ElementEntity
$elements : array<string|int, mixed>
$scope : string

        
On this page

Search results