‪TYPO3CMS  ‪main
CommandMap.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
27 
35 {
36  public const ‪SCOPE_WorkspacesSwap = 'SCOPE_WorkspacesSwap';
37  public const ‪SCOPE_WorkspacesSetStage = 'SCOPE_WorkspacesSetStage';
38  public const ‪SCOPE_WorkspacesClear = 'SCOPE_WorkspacesClear';
39  public const ‪KEY_GetElementPropertiesCallback = 'KEY_GetElementPropertiesCallback';
40  public const ‪KEY_GetCommonPropertiesCallback = 'KEY_GetCommonPropertiesCallback';
41  public const ‪KEY_ElementConstructCallback = 'KEY_EventConstructCallback';
42  public const ‪KEY_ElementCreateChildReferenceCallback = 'KEY_ElementCreateChildReferenceCallback';
43  public const ‪KEY_ElementCreateParentReferenceCallback = 'KEY_ElementCreateParentReferenceCallback';
44  public const ‪KEY_UpdateGetIdCallback = 'KEY_UpdateGetIdCallback';
45  public const ‪KEY_TransformDependentElementsToUseLiveId = 'KEY_TransformDependentElementsToUseLiveId';
46 
47  protected array ‪$commandMap = [];
48  protected int ‪$workspace;
49  protected array ‪$scopes = [];
51 
52  public function ‪__construct(array ‪$commandMap, int ‪$workspace)
53  {
54  $this->set(‪$commandMap);
55  $this->‪setWorkspace($workspace);
56  $this->‪constructScopes();
57  }
58 
62  public function get(): array
63  {
64  return ‪$this->commandMap;
65  }
66 
70  public function set(array ‪$commandMap): self
71  {
72  $this->commandMap = ‪$commandMap;
73  return $this;
74  }
75 
79  public function ‪setWorkspace(int ‪$workspace): void
80  {
81  $this->workspace = ‪$workspace;
82  }
83 
87  public function ‪getWorkspace(): int
88  {
89  return ‪$this->workspace;
90  }
91 
96  {
97  if (!isset($this->elementEntityProcessor)) {
98  $this->elementEntityProcessor = GeneralUtility::makeInstance(ElementEntityProcessor::class);
99  $this->elementEntityProcessor->setWorkspace($this->‪getWorkspace());
100  }
102  }
103 
107  public function ‪process(): self
108  {
112  return $this;
113  }
114 
121  protected function ‪resolveWorkspacesSwapDependencies(): void
122  {
124  $dependency = $this->‪getDependencyUtility($scope);
125  $arguments = [$dependency];
126  foreach ($this->commandMap as $table => $liveIdCollection) {
127  foreach ($liveIdCollection as $liveId => $commandCollection) {
128  foreach ($commandCollection as $command => $properties) {
129  if ($command === 'version' && isset($properties['action']) && in_array($properties['action'], ['publish', 'swap'], true)) {
130  if (isset($properties['swapWith']) && ‪MathUtility::canBeInterpretedAsInteger($properties['swapWith'])) {
131  $this->‪addWorkspacesSwapElements(...array_merge($arguments, [$table, $liveId, $properties]));
132  }
133  }
134  }
135  }
136  }
137  $this->‪applyWorkspacesDependencies($dependency, $scope);
138  }
139 
143  protected function ‪addWorkspacesSwapElements(‪DependencyResolver $dependency, string $table, int $liveId, array $properties): void
144  {
145  $dependency->‪addElement($table, (int)$properties['swapWith'], ['liveId' => $liveId, 'properties' => $properties]);
146  }
147 
153  protected function ‪invokeWorkspacesSetStageItems(string $callbackMethod, array $arguments = []): void
154  {
155  // Traverses the cmd[] array and fetches the accordant actions:
156  foreach ($this->commandMap as $table => $versionIdCollection) {
157  foreach ($versionIdCollection as $versionIdList => $commandCollection) {
158  foreach ($commandCollection as $command => $properties) {
159  if ($command === 'version' && isset($properties['action']) && $properties['action'] === 'setStage') {
160  if (isset($properties['stageId']) && ‪MathUtility::canBeInterpretedAsInteger($properties['stageId'])) {
161  $this->$callbackMethod(...array_merge($arguments, [$table, $versionIdList, $properties]));
162  }
163  }
164  }
165  }
166  }
167  }
168 
174  protected function ‪resolveWorkspacesSetStageDependencies(): void
175  {
177  $dependency = $this->‪getDependencyUtility($scope);
178  $this->‪invokeWorkspacesSetStageItems('explodeSetStage');
179  $this->‪invokeWorkspacesSetStageItems('addWorkspacesSetStageElements', [$dependency]);
180  $this->‪applyWorkspacesDependencies($dependency, $scope);
181  }
182 
186  protected function ‪addWorkspacesSetStageElements(‪DependencyResolver $dependency, string $table, int $versionId, array $properties): void
187  {
188  $dependency->‪addElement($table, $versionId, ['versionId' => $versionId, 'properties' => $properties]);
189  }
190 
196  protected function ‪resolveWorkspacesClearDependencies(): void
197  {
199  $dependency = $this->‪getDependencyUtility($scope);
200  // Traverses the cmd[] array and fetches the accordant actions:
201  foreach ($this->commandMap as $table => $versionIdCollection) {
202  foreach ($versionIdCollection as $versionId => $commandCollection) {
203  foreach ($commandCollection as $command => $properties) {
204  if ($command === 'version' && isset($properties['action']) && ($properties['action'] === 'clearWSID' || $properties['action'] === 'flush')) {
205  $dependency->addElement($table, $versionId, ['versionId' => $versionId, 'properties' => $properties]);
206  }
207  }
208  }
209  }
210  $this->‪applyWorkspacesDependencies($dependency, $scope);
211  }
212 
216  protected function ‪explodeSetStage(string $table, string|int $versionIdList, array $properties): void
217  {
218  $extractedCommandMap = [];
219  $versionIds = ‪GeneralUtility::trimExplode(',', (string)$versionIdList, true);
220  if (count($versionIds) > 1) {
221  foreach ($versionIds as $versionId) {
222  if (isset($this->commandMap[$table][$versionId]['version'])) {
223  throw new \RuntimeException('Command map for [' . $table . '][' . $versionId . '][version] was already set.', 1289391048);
224  }
225  $extractedCommandMap[$table][$versionId]['version'] = $properties;
226  $this->remove($table, $versionId, 'version');
227  }
228  $this->‪mergeToBottom($extractedCommandMap);
229  }
230  }
231 
236  protected function ‪applyWorkspacesDependencies(‪DependencyResolver $dependency, string $scope): void
237  {
238  $transformDependentElementsToUseLiveId = $this->‪getScopeData($scope, self::KEY_TransformDependentElementsToUseLiveId);
239  $elementsToBeVersioned = $dependency->‪getElements();
240  // Use the uid of the live record instead of the workspace record:
241  if ($transformDependentElementsToUseLiveId) {
242  $elementsToBeVersioned = $this->‪getElementEntityProcessor()->transformDependentElementsToUseLiveId($elementsToBeVersioned);
243  }
244  $outerMostParents = $dependency->‪getOuterMostParents();
246  foreach ($outerMostParents as $outerMostParent) {
247  $dependentElements = $dependency->‪getNestedElements($outerMostParent);
248  if ($transformDependentElementsToUseLiveId) {
249  $dependentElements = $this->‪getElementEntityProcessor()->transformDependentElementsToUseLiveId($dependentElements);
250  }
251  // Gets the difference (intersection) between elements that were submitted by the user
252  // and the evaluation of all dependent records that should be used for this action instead:
253  $intersectingElements = array_intersect_key($dependentElements, $elementsToBeVersioned);
254  if (!empty($intersectingElements)) {
255  $this->‪update(current($intersectingElements), $dependentElements, $scope);
256  }
257  }
258  }
259 
263  protected function ‪update(‪ElementEntity $intersectingElement, array $elements, string $scope): void
264  {
265  $orderedCommandMap = [];
266  $commonProperties = [];
267  if ($this->‪getScopeData($scope, self::KEY_GetCommonPropertiesCallback)) {
268  $commonProperties = $this->‪processCallback($this->‪getScopeData($scope, self::KEY_GetCommonPropertiesCallback), [$intersectingElement]);
269  }
271  foreach ($elements as $element) {
272  $table = $element->getTable();
273  $id = $this->‪processCallback($this->‪getScopeData($scope, self::KEY_UpdateGetIdCallback), [$element]);
274  $this->remove($table, $id, 'version');
275  if ($element->isInvalid()) {
276  continue;
277  }
278  $orderedCommandMap[$table][$id]['version'] = $commonProperties;
279  if ($this->‪getScopeData($scope, self::KEY_GetElementPropertiesCallback)) {
280  $orderedCommandMap[$table][$id]['version'] = array_merge($commonProperties, $this->‪processCallback($this->‪getScopeData($scope, self::KEY_GetElementPropertiesCallback), [$element]));
281  }
282  }
283  // Ensure that ordered command map is on top of the command map:
284  $this->‪mergeToTop($orderedCommandMap);
285  }
286 
290  protected function ‪mergeToTop(array ‪$commandMap): void
291  {
292  ArrayUtility::mergeRecursiveWithOverrule(‪$commandMap, $this->commandMap);
293  $this->commandMap = ‪$commandMap;
294  }
295 
299  protected function ‪mergeToBottom(array ‪$commandMap): void
300  {
301  ArrayUtility::mergeRecursiveWithOverrule($this->commandMap, ‪$commandMap);
302  }
303 
307  protected function remove(string $table, int|string $id, string $command = null): void
308  {
309  if (is_string($command)) {
310  unset($this->commandMap[$table][$id][$command]);
311  } else {
312  unset($this->commandMap[$table][$id]);
313  }
314  }
315 
319  protected function ‪getElementLiveIdCallback(‪ElementEntity $element): int
320  {
321  return $element->‪getDataValue('liveId');
322  }
323 
327  protected function ‪getElementIdCallback(‪ElementEntity $element): int
328  {
329  return $element->‪getId();
330  }
331 
335  protected function ‪getElementSwapPropertiesCallback(‪ElementEntity $element): array
336  {
337  return [
338  'swapWith' => $element->‪getId(),
339  ];
340  }
341 
348  {
349  $commonSwapProperties = [];
350  $elementProperties = $element->‪getDataValue('properties');
351  if (isset($elementProperties['action'])) {
352  $commonSwapProperties['action'] = $elementProperties['action'];
353  }
354  return $commonSwapProperties;
355  }
356 
360  protected function ‪getCommonSwapPropertiesCallback(‪ElementEntity $element): array
361  {
362  $commonSwapProperties = [];
363  $elementProperties = $element->‪getDataValue('properties');
364  if (isset($elementProperties['action'])) {
365  $commonSwapProperties['action'] = $elementProperties['action'];
366  }
367  if (isset($elementProperties['comment'])) {
368  $commonSwapProperties['comment'] = $elementProperties['comment'];
369  }
370  if (isset($elementProperties['notificationAlternativeRecipients'])) {
371  $commonSwapProperties['notificationAlternativeRecipients'] = $elementProperties['notificationAlternativeRecipients'];
372  }
373 
374  return $commonSwapProperties;
375  }
376 
380  protected function ‪getElementSetStagePropertiesCallback(‪ElementEntity $element): array
381  {
382  return $this->‪getCommonSetStagePropertiesCallback($element);
383  }
384 
388  protected function ‪getCommonSetStagePropertiesCallback(‪ElementEntity $element): array
389  {
390  $commonSetStageProperties = [];
391  $elementProperties = $element->‪getDataValue('properties');
392  if (isset($elementProperties['stageId'])) {
393  $commonSetStageProperties['stageId'] = $elementProperties['stageId'];
394  }
395  if (isset($elementProperties['comment'])) {
396  $commonSetStageProperties['comment'] = $elementProperties['comment'];
397  }
398  if (isset($elementProperties['action'])) {
399  $commonSetStageProperties['action'] = $elementProperties['action'];
400  }
401  if (isset($elementProperties['notificationAlternativeRecipients'])) {
402  $commonSetStageProperties['notificationAlternativeRecipients'] = $elementProperties['notificationAlternativeRecipients'];
403  }
404  return $commonSetStageProperties;
405  }
406 
412  protected function ‪getDependencyUtility(string $scope): ‪DependencyResolver
413  {
414  $dependency = GeneralUtility::makeInstance(DependencyResolver::class);
415  $dependency->setWorkspace($this->‪getWorkspace());
416  $dependency->setOuterMostParentsRequireReferences(true);
417  if ($this->‪getScopeData($scope, self::KEY_ElementConstructCallback)) {
418  $dependency->setEventCallback(‪ElementEntity::EVENT_Construct, $this->‪getDependencyCallback($this->‪getScopeData($scope, self::KEY_ElementConstructCallback)));
419  }
420  if ($this->‪getScopeData($scope, self::KEY_ElementCreateChildReferenceCallback)) {
421  $dependency->setEventCallback(‪ElementEntity::EVENT_CreateChildReference, $this->‪getDependencyCallback($this->‪getScopeData($scope, self::KEY_ElementCreateChildReferenceCallback)));
422  }
423  if ($this->‪getScopeData($scope, self::KEY_ElementCreateParentReferenceCallback)) {
424  $dependency->setEventCallback(‪ElementEntity::EVENT_CreateParentReference, $this->‪getDependencyCallback($this->‪getScopeData($scope, self::KEY_ElementCreateParentReferenceCallback)));
425  }
426  return $dependency;
427  }
428 
433  protected function ‪constructScopes(): void
434  {
435  $this->scopes = [
436  // settings for publishing and swapping:
437  self::SCOPE_WorkspacesSwap => [
438  // callback functions used to modify the commandMap
439  // + element properties are specific for each element
440  // + common properties are the same for all elements
441  self::KEY_GetElementPropertiesCallback => 'getElementSwapPropertiesCallback',
442  self::KEY_GetCommonPropertiesCallback => 'getCommonSwapPropertiesCallback',
443  // callback function used, when a new element to be checked is added
444  self::KEY_ElementConstructCallback => 'createNewDependentElementCallback',
445  // callback function used to determine whether an element is a valid child or parent reference (e.g. IRRE)
446  self::KEY_ElementCreateChildReferenceCallback => 'createNewDependentElementChildReferenceCallback',
447  self::KEY_ElementCreateParentReferenceCallback => 'createNewDependentElementParentReferenceCallback',
448  // callback function used to fetch the correct record uid on modifying the commandMap
449  self::KEY_UpdateGetIdCallback => 'getElementLiveIdCallback',
450  // setting whether to use the uid of the live record instead of the workspace record
451  self::KEY_TransformDependentElementsToUseLiveId => true,
452  ],
453  // settings for modifying the stage:
454  self::SCOPE_WorkspacesSetStage => [
455  // callback functions used to modify the commandMap
456  // + element properties are specific for each element
457  // + common properties are the same for all elements
458  self::KEY_GetElementPropertiesCallback => 'getElementSetStagePropertiesCallback',
459  self::KEY_GetCommonPropertiesCallback => 'getCommonSetStagePropertiesCallback',
460  // callback function used, when a new element to be checked is added
461  self::KEY_ElementConstructCallback => null,
462  // callback function used to determine whether an element is a valid child or parent reference (e.g. IRRE)
463  self::KEY_ElementCreateChildReferenceCallback => 'createNewDependentElementChildReferenceCallback',
464  self::KEY_ElementCreateParentReferenceCallback => 'createNewDependentElementParentReferenceCallback',
465  // callback function used to fetch the correct record uid on modifying the commandMap
466  self::KEY_UpdateGetIdCallback => 'getElementIdCallback',
467  // setting whether to use the uid of the live record instead of the workspace record
468  self::KEY_TransformDependentElementsToUseLiveId => false,
469  ],
470  // settings for clearing and flushing:
471  self::SCOPE_WorkspacesClear => [
472  // callback functions used to modify the commandMap
473  // + element properties are specific for each element
474  // + common properties are the same for all elements
475  self::KEY_GetElementPropertiesCallback => null,
476  self::KEY_GetCommonPropertiesCallback => 'getCommonClearPropertiesCallback',
477  // callback function used, when a new element to be checked is added
478  self::KEY_ElementConstructCallback => null,
479  // callback function used to determine whether an element is a valid child or parent reference (e.g. IRRE)
480  self::KEY_ElementCreateChildReferenceCallback => 'createClearDependentElementChildReferenceCallback',
481  self::KEY_ElementCreateParentReferenceCallback => 'createClearDependentElementParentReferenceCallback',
482  // callback function used to fetch the correct record uid on modifying the commandMap
483  self::KEY_UpdateGetIdCallback => 'getElementIdCallback',
484  // setting whether to use the uid of the live record instead of the workspace record
485  self::KEY_TransformDependentElementsToUseLiveId => false,
486  ],
487  ];
488  }
489 
495  protected function ‪getScopeData(string $scope, string $key): null|bool|string
496  {
497  if (!isset($this->scopes[$scope])) {
498  throw new \RuntimeException('Scope "' . $scope . '" is not defined.', 1289342187);
499  }
500  return $this->scopes[$scope][$key];
501  }
502 
506  protected function ‪getDependencyCallback(string $method, array $targetArguments = []): ‪EventCallback
507  {
508  return GeneralUtility::makeInstance(
509  EventCallback::class,
511  $method,
512  $targetArguments
513  );
514  }
515 
519  protected function ‪processCallback(string $method, array $callbackArguments): mixed
520  {
521  return $this->$method(...$callbackArguments);
522  }
523 }
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\constructScopes
‪constructScopes()
Definition: CommandMap.php:433
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\mergeToTop
‪mergeToTop(array $commandMap)
Definition: CommandMap.php:290
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\invokeWorkspacesSetStageItems
‪invokeWorkspacesSetStageItems(string $callbackMethod, array $arguments=[])
Definition: CommandMap.php:153
‪TYPO3\CMS\Workspaces\DataHandler
Definition: CommandMap.php:18
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\KEY_GetCommonPropertiesCallback
‪const KEY_GetCommonPropertiesCallback
Definition: CommandMap.php:40
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\SCOPE_WorkspacesSwap
‪const SCOPE_WorkspacesSwap
Definition: CommandMap.php:36
‪TYPO3\CMS\Workspaces\Dependency\DependencyResolver\addElement
‪addElement(string $table, int $id, array $data=[])
Definition: DependencyResolver.php:86
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\$elementEntityProcessor
‪ElementEntityProcessor $elementEntityProcessor
Definition: CommandMap.php:50
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap
Definition: CommandMap.php:35
‪TYPO3\CMS\Workspaces\Dependency\ElementEntity
Definition: ElementEntity.php:30
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\resolveWorkspacesSwapDependencies
‪resolveWorkspacesSwapDependencies()
Definition: CommandMap.php:121
‪TYPO3\CMS\Workspaces\Dependency\DependencyResolver\getElements
‪getElements()
Definition: DependencyResolver.php:143
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\KEY_GetElementPropertiesCallback
‪const KEY_GetElementPropertiesCallback
Definition: CommandMap.php:39
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\__construct
‪__construct(array $commandMap, int $workspace)
Definition: CommandMap.php:52
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\KEY_ElementCreateParentReferenceCallback
‪const KEY_ElementCreateParentReferenceCallback
Definition: CommandMap.php:43
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\explodeSetStage
‪explodeSetStage(string $table, string|int $versionIdList, array $properties)
Definition: CommandMap.php:216
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\process
‪process()
Definition: CommandMap.php:107
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\setWorkspace
‪setWorkspace(int $workspace)
Definition: CommandMap.php:79
‪TYPO3\CMS\Workspaces\Dependency\DependencyResolver
Definition: DependencyResolver.php:28
‪TYPO3\CMS\Workspaces\Dependency\EventCallback
Definition: EventCallback.php:26
‪TYPO3\CMS\Workspaces\Dependency\ElementEntity\EVENT_Construct
‪const EVENT_Construct
Definition: ElementEntity.php:33
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\getElementSetStagePropertiesCallback
‪getElementSetStagePropertiesCallback(ElementEntity $element)
Definition: CommandMap.php:380
‪TYPO3\CMS\Workspaces\Dependency\ElementEntity\getDataValue
‪getDataValue(string $key)
Definition: ElementEntity.php:104
‪TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger
‪static bool canBeInterpretedAsInteger(mixed $var)
Definition: MathUtility.php:69
‪TYPO3\CMS\Workspaces\Dependency\DependencyResolver\getOuterMostParents
‪ElementEntity[] getOuterMostParents()
Definition: DependencyResolver.php:99
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\KEY_ElementCreateChildReferenceCallback
‪const KEY_ElementCreateChildReferenceCallback
Definition: CommandMap.php:42
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\addWorkspacesSetStageElements
‪addWorkspacesSetStageElements(DependencyResolver $dependency, string $table, int $versionId, array $properties)
Definition: CommandMap.php:186
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\getElementEntityProcessor
‪getElementEntityProcessor()
Definition: CommandMap.php:95
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\update
‪update(ElementEntity $intersectingElement, array $elements, string $scope)
Definition: CommandMap.php:263
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\SCOPE_WorkspacesClear
‪const SCOPE_WorkspacesClear
Definition: CommandMap.php:38
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\resolveWorkspacesSetStageDependencies
‪resolveWorkspacesSetStageDependencies()
Definition: CommandMap.php:174
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\addWorkspacesSwapElements
‪addWorkspacesSwapElements(DependencyResolver $dependency, string $table, int $liveId, array $properties)
Definition: CommandMap.php:143
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\$scopes
‪array $scopes
Definition: CommandMap.php:49
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\KEY_TransformDependentElementsToUseLiveId
‪const KEY_TransformDependentElementsToUseLiveId
Definition: CommandMap.php:45
‪TYPO3\CMS\Workspaces\Dependency\ElementEntity\EVENT_CreateChildReference
‪const EVENT_CreateChildReference
Definition: ElementEntity.php:34
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\getWorkspace
‪getWorkspace()
Definition: CommandMap.php:87
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\getDependencyCallback
‪getDependencyCallback(string $method, array $targetArguments=[])
Definition: CommandMap.php:506
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\getCommonSetStagePropertiesCallback
‪getCommonSetStagePropertiesCallback(ElementEntity $element)
Definition: CommandMap.php:388
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\$commandMap
‪array $commandMap
Definition: CommandMap.php:47
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\SCOPE_WorkspacesSetStage
‪const SCOPE_WorkspacesSetStage
Definition: CommandMap.php:37
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\getScopeData
‪getScopeData(string $scope, string $key)
Definition: CommandMap.php:495
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\$workspace
‪int $workspace
Definition: CommandMap.php:48
‪TYPO3\CMS\Workspaces\Dependency\ElementEntityProcessor
Definition: ElementEntityProcessor.php:31
‪TYPO3\CMS\Workspaces\Dependency\ElementEntity\EVENT_CreateParentReference
‪const EVENT_CreateParentReference
Definition: ElementEntity.php:35
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\mergeToBottom
‪mergeToBottom(array $commandMap)
Definition: CommandMap.php:299
‪TYPO3\CMS\Core\Utility\ArrayUtility
Definition: ArrayUtility.php:26
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\getElementIdCallback
‪getElementIdCallback(ElementEntity $element)
Definition: CommandMap.php:327
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\KEY_ElementConstructCallback
‪const KEY_ElementConstructCallback
Definition: CommandMap.php:41
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\getElementSwapPropertiesCallback
‪getElementSwapPropertiesCallback(ElementEntity $element)
Definition: CommandMap.php:335
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\resolveWorkspacesClearDependencies
‪resolveWorkspacesClearDependencies()
Definition: CommandMap.php:196
‪TYPO3\CMS\Core\Utility\MathUtility
Definition: MathUtility.php:24
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\getCommonClearPropertiesCallback
‪array getCommonClearPropertiesCallback(ElementEntity $element)
Definition: CommandMap.php:347
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\applyWorkspacesDependencies
‪applyWorkspacesDependencies(DependencyResolver $dependency, string $scope)
Definition: CommandMap.php:236
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\KEY_UpdateGetIdCallback
‪const KEY_UpdateGetIdCallback
Definition: CommandMap.php:44
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\getDependencyUtility
‪getDependencyUtility(string $scope)
Definition: CommandMap.php:412
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\processCallback
‪processCallback(string $method, array $callbackArguments)
Definition: CommandMap.php:519
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\getCommonSwapPropertiesCallback
‪getCommonSwapPropertiesCallback(ElementEntity $element)
Definition: CommandMap.php:360
‪TYPO3\CMS\Workspaces\DataHandler\CommandMap\getElementLiveIdCallback
‪getElementLiveIdCallback(ElementEntity $element)
Definition: CommandMap.php:319
‪TYPO3\CMS\Workspaces\Dependency\ElementEntity\getId
‪getId()
Definition: ElementEntity.php:80
‪TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode
‪static list< string > trimExplode(string $delim, string $string, bool $removeEmptyValues=false, int $limit=0)
Definition: GeneralUtility.php:822
‪TYPO3\CMS\Workspaces\Dependency\DependencyResolver\getNestedElements
‪getNestedElements(ElementEntity $outerMostParent)
Definition: DependencyResolver.php:130