TYPO3 CMS  TYPO3_6-2
CommandMap.php
Go to the documentation of this file.
1 <?php
3 
20 
25 class CommandMap {
26 
27  const SCOPE_WorkspacesSwap = 'SCOPE_WorkspacesSwap';
28  const SCOPE_WorkspacesSetStage = 'SCOPE_WorkspacesSetStage';
29  const SCOPE_WorkspacesClear = 'SCOPE_WorkspacesClear';
30  const KEY_ScopeErrorMessage = 'KEY_ScopeErrorMessage';
31  const KEY_ScopeErrorCode = 'KEY_ScopeErrorCode';
32  const KEY_GetElementPropertiesCallback = 'KEY_GetElementPropertiesCallback';
33  const KEY_GetCommonPropertiesCallback = 'KEY_GetCommonPropertiesCallback';
34  const KEY_ElementConstructCallback = 'KEY_EventConstructCallback';
35  const KEY_ElementCreateChildReferenceCallback = 'KEY_ElementCreateChildReferenceCallback';
36  const KEY_ElementCreateParentReferenceCallback = 'KEY_ElementCreateParentReferenceCallback';
37  const KEY_PurgeWithErrorMessageGetIdCallback = 'KEY_PurgeWithErrorMessageGetIdCallback';
38  const KEY_UpdateGetIdCallback = 'KEY_UpdateGetIdCallback';
39  const KEY_TransformDependentElementsToUseLiveId = 'KEY_TransformDependentElementsToUseLiveId';
40 
44  protected $parent;
45 
49  protected $tceMain;
50 
54  protected $commandMap = array();
55 
59  protected $workspace;
60 
65 
70 
75 
79  protected $scopes;
80 
85 
94  public function __construct(\TYPO3\CMS\Version\Hook\DataHandlerHook $parent, \TYPO3\CMS\Core\DataHandling\DataHandler $tceMain, array $commandMap, $workspace) {
95  $this->setParent($parent);
96  $this->setTceMain($tceMain);
97  $this->set($commandMap);
98  $this->setWorkspace($workspace);
99  $this->setWorkspacesSwapMode($this->getTceMain()->BE_USER->getTSConfigVal('options.workspaces.swapMode'));
100  $this->setWorkspacesChangeStageMode($this->getTceMain()->BE_USER->getTSConfigVal('options.workspaces.changeStageMode'));
101  $this->setWorkspacesConsiderReferences($this->getTceMain()->BE_USER->getTSConfigVal('options.workspaces.considerReferences'));
102  $this->constructScopes();
103  }
104 
110  public function get() {
111  return $this->commandMap;
112  }
113 
120  public function set(array $commandMap) {
121  $this->commandMap = $commandMap;
122  return $this;
123  }
124 
130  public function getParent() {
131  return $this->parent;
132  }
133 
140  public function setParent(\TYPO3\CMS\Version\Hook\DataHandlerHook $parent) {
141  $this->parent = $parent;
142  return $this;
143  }
144 
150  public function getTceMain() {
151  return $this->tceMain;
152  }
153 
160  public function setTceMain(\TYPO3\CMS\Core\DataHandling\DataHandler $tceMain) {
161  $this->tceMain = $tceMain;
162  return $this;
163  }
164 
170  public function setWorkspace($workspace) {
171  $this->workspace = (int)$workspace;
172  }
173 
179  public function getWorkspace() {
180  return $this->workspace;
181  }
182 
191  $this->workspacesSwapMode = (string) $workspacesSwapMode;
192  return $this;
193  }
194 
203  $this->workspacesChangeStageMode = (string) $workspacesChangeStageMode;
204  return $this;
205  }
206 
215  $this->workspacesConsiderReferences = (bool) $workspacesConsiderReferences;
216  return $this;
217  }
218 
224  protected function getElementEntityProcessor() {
225  if (!isset($this->elementEntityProcessor)) {
226  $this->elementEntityProcessor = GeneralUtility::makeInstance(
227  'TYPO3\\CMS\\Version\\Dependency\\ElementEntityProcessor'
228  );
229  $this->elementEntityProcessor->setWorkspace($this->getWorkspace());
230  }
232  }
233 
239  public function process() {
243  return $this;
244  }
245 
253  protected function invokeWorkspacesSwapItems($callbackMethod, array $arguments = array()) {
254  // Traverses the cmd[] array and fetches the accordant actions:
255  foreach ($this->commandMap as $table => $liveIdCollection) {
256  foreach ($liveIdCollection as $liveId => $commandCollection) {
257  foreach ($commandCollection as $command => $properties) {
258  if ($command === 'version' && isset($properties['action']) && $properties['action'] === 'swap') {
259  if (isset($properties['swapWith']) && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($properties['swapWith'])) {
260  call_user_func_array(array($this, $callbackMethod), array_merge($arguments, array($table, $liveId, $properties)));
261  }
262  }
263  }
264  }
265  }
266  }
267 
276  protected function resolveWorkspacesSwapDependencies() {
277  $scope = self::SCOPE_WorkspacesSwap;
278  $dependency = $this->getDependencyUtility($scope);
279  if (GeneralUtility::inList('any,pages', $this->workspacesSwapMode)) {
280  $this->invokeWorkspacesSwapItems('applyWorkspacesSwapBehaviour');
281  }
282  $this->invokeWorkspacesSwapItems('addWorkspacesSwapElements', array($dependency));
283  $this->applyWorkspacesDependencies($dependency, $scope);
284  }
285 
294  protected function applyWorkspacesSwapBehaviour($table, $liveId, array $properties) {
295  $extendedCommandMap = array();
296  $elementList = array();
297  // Fetch accordant elements if the swapMode is 'any' or 'pages':
298  if ($this->workspacesSwapMode === 'any' || $this->workspacesSwapMode === 'pages' && $table === 'pages') {
299  $elementList = $this->getParent()->findPageElementsForVersionSwap($table, $liveId, $properties['swapWith']);
300  }
301  foreach ($elementList as $elementTable => $elementIdArray) {
302  foreach ($elementIdArray as $elementIds) {
303  $extendedCommandMap[$elementTable][$elementIds[0]]['version'] = array_merge($properties, array('swapWith' => $elementIds[1]));
304  }
305  }
306  if (count($elementList) > 0) {
307  $this->remove($table, $liveId, 'version');
308  $this->mergeToBottom($extendedCommandMap);
309  }
310  }
311 
321  protected function addWorkspacesSwapElements(\TYPO3\CMS\Version\Dependency\DependencyResolver $dependency, $table, $liveId, array $properties) {
322  $elementList = array();
323  // Fetch accordant elements if the swapMode is 'any' or 'pages':
324  if ($this->workspacesSwapMode === 'any' || $this->workspacesSwapMode === 'pages' && $table === 'pages') {
325  $elementList = $this->getParent()->findPageElementsForVersionSwap($table, $liveId, $properties['swapWith']);
326  }
327  foreach ($elementList as $elementTable => $elementIdArray) {
328  foreach ($elementIdArray as $elementIds) {
329  $dependency->addElement($elementTable, $elementIds[1], array('liveId' => $elementIds[0], 'properties' => array_merge($properties, array('swapWith' => $elementIds[1]))));
330  }
331  }
332  if (count($elementList) === 0) {
333  $dependency->addElement($table, $properties['swapWith'], array('liveId' => $liveId, 'properties' => $properties));
334  }
335  }
336 
344  protected function invokeWorkspacesSetStageItems($callbackMethod, array $arguments = array()) {
345  // Traverses the cmd[] array and fetches the accordant actions:
346  foreach ($this->commandMap as $table => $versionIdCollection) {
347  foreach ($versionIdCollection as $versionIdList => $commandCollection) {
348  foreach ($commandCollection as $command => $properties) {
349  if ($command === 'version' && isset($properties['action']) && $properties['action'] === 'setStage') {
350  if (isset($properties['stageId']) && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($properties['stageId'])) {
351  call_user_func_array(array($this, $callbackMethod), array_merge($arguments, array($table, $versionIdList, $properties)));
352  }
353  }
354  }
355  }
356  }
357  }
358 
367  $scope = self::SCOPE_WorkspacesSetStage;
368  $dependency = $this->getDependencyUtility($scope);
369  if (GeneralUtility::inList('any,pages', $this->workspacesChangeStageMode)) {
370  $this->invokeWorkspacesSetStageItems('applyWorkspacesSetStageBehaviour');
371  }
372  $this->invokeWorkspacesSetStageItems('explodeSetStage');
373  $this->invokeWorkspacesSetStageItems('addWorkspacesSetStageElements', array($dependency));
374  $this->applyWorkspacesDependencies($dependency, $scope);
375  }
376 
385  protected function applyWorkspacesSetStageBehaviour($table, $versionIdList, array $properties) {
386  $extendedCommandMap = array();
387  $versionIds = GeneralUtility::trimExplode(',', $versionIdList, TRUE);
388  $elementList = array($table => $versionIds);
389  if (GeneralUtility::inList('any,pages', $this->workspacesChangeStageMode)) {
390  if (count($versionIds) === 1) {
391  $workspaceRecord = BackendUtility::getRecord($table, $versionIds[0], 't3ver_wsid');
392  $workspaceId = $workspaceRecord['t3ver_wsid'];
393  } else {
394  $workspaceId = $this->getWorkspace();
395  }
396  if ($table === 'pages') {
397  // Find all elements from the same ws to change stage
398  $livePageIds = $versionIds;
399  $this->getParent()->findRealPageIds($livePageIds);
400  $this->getParent()->findPageElementsForVersionStageChange($livePageIds, $workspaceId, $elementList);
401  } elseif ($this->workspacesChangeStageMode === 'any') {
402  // Find page to change stage:
403  $pageIdList = array();
404  $this->getParent()->findPageIdsForVersionStateChange($table, $versionIds, $workspaceId, $pageIdList, $elementList);
405  // Find other elements from the same ws to change stage:
406  $this->getParent()->findPageElementsForVersionStageChange($pageIdList, $workspaceId, $elementList);
407  }
408  }
409  foreach ($elementList as $elementTable => $elementIds) {
410  foreach ($elementIds as $elementId) {
411  $extendedCommandMap[$elementTable][$elementId]['version'] = $properties;
412  }
413  }
414  $this->remove($table, $versionIds, 'version');
415  $this->mergeToBottom($extendedCommandMap);
416  }
417 
427  protected function addWorkspacesSetStageElements(\TYPO3\CMS\Version\Dependency\DependencyResolver $dependency, $table, $versionId, array $properties) {
428  $dependency->addElement($table, $versionId, array('versionId' => $versionId, 'properties' => $properties));
429  }
430 
438  protected function resolveWorkspacesClearDependencies() {
439  $scope = self::SCOPE_WorkspacesClear;
440  $dependency = $this->getDependencyUtility($scope);
441  // Traverses the cmd[] array and fetches the accordant actions:
442  foreach ($this->commandMap as $table => $versionIdCollection) {
443  foreach ($versionIdCollection as $versionId => $commandCollection) {
444  foreach ($commandCollection as $command => $properties) {
445  if ($command === 'version' && isset($properties['action']) && ($properties['action'] === 'clearWSID' || $properties['action'] === 'flush')) {
446  $dependency->addElement($table, $versionId, array('versionId' => $versionId, 'properties' => $properties));
447  }
448  }
449  }
450  }
451  $this->applyWorkspacesDependencies($dependency, $scope);
452  }
453 
463  protected function explodeSetStage($table, $versionIdList, array $properties) {
464  $extractedCommandMap = array();
465  $versionIds = GeneralUtility::trimExplode(',', $versionIdList, TRUE);
466  if (count($versionIds) > 1) {
467  foreach ($versionIds as $versionId) {
468  if (isset($this->commandMap[$table][$versionId]['version'])) {
469  throw new \RuntimeException('Command map for [' . $table . '][' . $versionId . '][version] was already set.', 1289391048);
470  }
471  $extractedCommandMap[$table][$versionId]['version'] = $properties;
472  }
473  $this->remove($table, $versionIdList, 'version');
474  $this->mergeToBottom($extractedCommandMap);
475  }
476  }
477 
486  protected function applyWorkspacesDependencies(\TYPO3\CMS\Version\Dependency\DependencyResolver $dependency, $scope) {
487  $transformDependentElementsToUseLiveId = $this->getScopeData($scope, self::KEY_TransformDependentElementsToUseLiveId);
488  $elementsToBeVersioned = $dependency->getElements();
489  // Use the uid of the live record instead of the workspace record:
490  if ($transformDependentElementsToUseLiveId) {
491  $elementsToBeVersioned = $this->getElementEntityProcessor()->transformDependentElementsToUseLiveId($elementsToBeVersioned);
492  }
493  $outerMostParents = $dependency->getOuterMostParents();
495  foreach ($outerMostParents as $outerMostParent) {
496  $dependentElements = $dependency->getNestedElements($outerMostParent);
497  if ($transformDependentElementsToUseLiveId) {
498  $dependentElements = $this->getElementEntityProcessor()->transformDependentElementsToUseLiveId($dependentElements);
499  }
500  // Gets the difference (intersection) between elements that were submitted by the user
501  // and the evaluation of all dependent records that should be used for this action instead:
502  $intersectingElements = array_intersect_key($dependentElements, $elementsToBeVersioned);
503  if (count($intersectingElements) > 0) {
504  // If at least one element intersects but not all, throw away all elements of the depdendent structure:
505  if (count($intersectingElements) !== count($dependentElements) && $this->workspacesConsiderReferences === FALSE) {
506  $this->purgeWithErrorMessage($intersectingElements, $scope);
507  } else {
508  $this->update(current($intersectingElements), $dependentElements, $scope);
509  }
510  }
511  }
512  }
513 
521  protected function purgeWithErrorMessage(array $elements, $scope) {
523  foreach ($elements as $element) {
524  $table = $element->getTable();
525  $id = $this->processCallback($this->getScopeData($scope, self::KEY_PurgeWithErrorMessageGetIdCallback), array($element));
526  $this->remove($table, $id, 'version');
527  $this->getTceMain()->log($table, $id, 5, 0, 1, $this->getScopeData($scope, self::KEY_ScopeErrorMessage), $this->getScopeData($scope, self::KEY_ScopeErrorCode), array(
528  BackendUtility::getRecordTitle($table, BackendUtility::getRecord($table, $id)),
529  $table,
530  $id
531  ));
532  }
533  }
534 
543  protected function update(ElementEntity $intersectingElement, array $elements, $scope) {
544  $orderedCommandMap = array();
545  $commonProperties = array();
546  if ($this->getScopeData($scope, self::KEY_GetCommonPropertiesCallback)) {
547  $commonProperties = $this->processCallback($this->getScopeData($scope, self::KEY_GetCommonPropertiesCallback), array($intersectingElement));
548  }
550  foreach ($elements as $element) {
551  $table = $element->getTable();
552  $id = $this->processCallback($this->getScopeData($scope, self::KEY_UpdateGetIdCallback), array($element));
553  $this->remove($table, $id, 'version');
554  if ($element->isInvalid()) {
555  continue;
556  }
557  $orderedCommandMap[$table][$id]['version'] = $commonProperties;
558  if ($this->getScopeData($scope, self::KEY_GetElementPropertiesCallback)) {
559  $orderedCommandMap[$table][$id]['version'] = array_merge($commonProperties, $this->processCallback($this->getScopeData($scope, self::KEY_GetElementPropertiesCallback), array($element)));
560  }
561  }
562  // Ensure that ordered command map is on top of the command map:
563  $this->mergeToTop($orderedCommandMap);
564  }
565 
572  protected function mergeToTop(array $commandMap) {
574  $this->commandMap = $commandMap;
575  }
576 
583  protected function mergeToBottom(array $commandMap) {
585  }
586 
595  protected function remove($table, $id, $command = NULL) {
596  if (is_string($command)) {
597  unset($this->commandMap[$table][$id][$command]);
598  } else {
599  unset($this->commandMap[$table][$id]);
600  }
601  }
602 
609  protected function getElementLiveIdCallback(ElementEntity $element) {
610  return $element->getDataValue('liveId');
611  }
612 
619  protected function getElementIdCallback(ElementEntity $element) {
620  return $element->getId();
621  }
622 
629  protected function getElementSwapPropertiesCallback(ElementEntity $element) {
630  return array(
631  'swapWith' => $element->getId()
632  );
633  }
634 
641  protected function getCommonClearPropertiesCallback(ElementEntity $element) {
642  $commonSwapProperties = array();
643  $elementProperties = $element->getDataValue('properties');
644  if (isset($elementProperties['action'])) {
645  $commonSwapProperties['action'] = $elementProperties['action'];
646  }
647  return $commonSwapProperties;
648  }
649 
656  protected function getCommonSwapPropertiesCallback(ElementEntity $element) {
657  $commonSwapProperties = array();
658  $elementProperties = $element->getDataValue('properties');
659  if (isset($elementProperties['action'])) {
660  $commonSwapProperties['action'] = $elementProperties['action'];
661  }
662  if (isset($elementProperties['swapIntoWS'])) {
663  $commonSwapProperties['swapIntoWS'] = $elementProperties['swapIntoWS'];
664  }
665  if (isset($elementProperties['comment'])) {
666  $commonSwapProperties['comment'] = $elementProperties['comment'];
667  }
668  if (isset($elementProperties['notificationAlternativeRecipients'])) {
669  $commonSwapProperties['notificationAlternativeRecipients'] = $elementProperties['notificationAlternativeRecipients'];
670  }
671 
672  return $commonSwapProperties;
673  }
674 
682  return $this->getCommonSetStagePropertiesCallback($element);
683  }
684 
691  protected function getCommonSetStagePropertiesCallback(ElementEntity $element) {
692  $commonSetStageProperties = array();
693  $elementProperties = $element->getDataValue('properties');
694  if (isset($elementProperties['stageId'])) {
695  $commonSetStageProperties['stageId'] = $elementProperties['stageId'];
696  }
697  if (isset($elementProperties['comment'])) {
698  $commonSetStageProperties['comment'] = $elementProperties['comment'];
699  }
700  if (isset($elementProperties['action'])) {
701  $commonSetStageProperties['action'] = $elementProperties['action'];
702  }
703  if (isset($elementProperties['notificationAlternativeRecipients'])) {
704  $commonSetStageProperties['notificationAlternativeRecipients'] = $elementProperties['notificationAlternativeRecipients'];
705  }
706  return $commonSetStageProperties;
707  }
708 
715  protected function getDependencyUtility($scope) {
717  $dependency = GeneralUtility::makeInstance('TYPO3\\CMS\\Version\\Dependency\\DependencyResolver');
718  $dependency->setWorkspace($this->getWorkspace());
719  $dependency->setOuterMostParentsRequireReferences(TRUE);
720  if ($this->getScopeData($scope, self::KEY_ElementConstructCallback)) {
721  $dependency->setEventCallback(ElementEntity::EVENT_Construct, $this->getDependencyCallback($this->getScopeData($scope, self::KEY_ElementConstructCallback)));
722  }
723  if ($this->getScopeData($scope, self::KEY_ElementCreateChildReferenceCallback)) {
724  $dependency->setEventCallback(ElementEntity::EVENT_CreateChildReference, $this->getDependencyCallback($this->getScopeData($scope, self::KEY_ElementCreateChildReferenceCallback)));
725  }
726  if ($this->getScopeData($scope, self::KEY_ElementCreateParentReferenceCallback)) {
727  $dependency->setEventCallback(ElementEntity::EVENT_CreateParentReference, $this->getDependencyCallback($this->getScopeData($scope, self::KEY_ElementCreateParentReferenceCallback)));
728  }
729  return $dependency;
730  }
731 
738  protected function constructScopes() {
739  $this->scopes = array(
740  // settings for publishing and swapping:
741  self::SCOPE_WorkspacesSwap => array(
742  // error message and error code
743  self::KEY_ScopeErrorMessage => 'Record "%s" (%s:%s) cannot be swapped or published independently, because it is related to other new or modified records.',
744  self::KEY_ScopeErrorCode => 1288283630,
745  // callback functons used to modify the commandMap
746  // + element properties are specific for each element
747  // + common properties are the same for all elements
748  self::KEY_GetElementPropertiesCallback => 'getElementSwapPropertiesCallback',
749  self::KEY_GetCommonPropertiesCallback => 'getCommonSwapPropertiesCallback',
750  // callback function used, when a new element to be checked is added
751  self::KEY_ElementConstructCallback => 'createNewDependentElementCallback',
752  // callback function used to determine whether an element is a valid child or parent reference (e.g. IRRE)
753  self::KEY_ElementCreateChildReferenceCallback => 'createNewDependentElementChildReferenceCallback',
754  self::KEY_ElementCreateParentReferenceCallback => 'createNewDependentElementParentReferenceCallback',
755  // callback function used to get the correct record uid to be used in the error message
756  self::KEY_PurgeWithErrorMessageGetIdCallback => 'getElementLiveIdCallback',
757  // callback function used to fetch the correct record uid on modifying the commandMap
758  self::KEY_UpdateGetIdCallback => 'getElementLiveIdCallback',
759  // setting whether to use the uid of the live record instead of the workspace record
760  self::KEY_TransformDependentElementsToUseLiveId => TRUE
761  ),
762  // settings for modifying the stage:
763  self::SCOPE_WorkspacesSetStage => array(
764  // error message and error code
765  self::KEY_ScopeErrorMessage => 'Record "%s" (%s:%s) cannot be sent to another stage independently, because it is related to other new or modified records.',
766  self::KEY_ScopeErrorCode => 1289342524,
767  // callback functons used to modify the commandMap
768  // + element properties are specific for each element
769  // + common properties are the same for all elements
770  self::KEY_GetElementPropertiesCallback => 'getElementSetStagePropertiesCallback',
771  self::KEY_GetCommonPropertiesCallback => 'getCommonSetStagePropertiesCallback',
772  // callback function used, when a new element to be checked is added
773  self::KEY_ElementConstructCallback => NULL,
774  // callback function used to determine whether an element is a valid child or parent reference (e.g. IRRE)
775  self::KEY_ElementCreateChildReferenceCallback => 'createNewDependentElementChildReferenceCallback',
776  self::KEY_ElementCreateParentReferenceCallback => 'createNewDependentElementParentReferenceCallback',
777  // callback function used to get the correct record uid to be used in the error message
778  self::KEY_PurgeWithErrorMessageGetIdCallback => 'getElementIdCallback',
779  // callback function used to fetch the correct record uid on modifying the commandMap
780  self::KEY_UpdateGetIdCallback => 'getElementIdCallback',
781  // setting whether to use the uid of the live record instead of the workspace record
782  self::KEY_TransformDependentElementsToUseLiveId => FALSE
783  ),
784  // settings for clearing and flushing:
785  self::SCOPE_WorkspacesClear => array(
786  // error message and error code
787  self::KEY_ScopeErrorMessage => 'Record "%s" (%s:%s) cannot be flushed independently, because it is related to other new or modified records.',
788  self::KEY_ScopeErrorCode => 1300467990,
789  // callback functons used to modify the commandMap
790  // + element properties are specific for each element
791  // + common properties are the same for all elements
792  self::KEY_GetElementPropertiesCallback => NULL,
793  self::KEY_GetCommonPropertiesCallback => 'getCommonClearPropertiesCallback',
794  // callback function used, when a new element to be checked is added
795  self::KEY_ElementConstructCallback => NULL,
796  // callback function used to determine whether an element is a valid child or parent reference (e.g. IRRE)
797  self::KEY_ElementCreateChildReferenceCallback => 'createClearDependentElementChildReferenceCallback',
798  self::KEY_ElementCreateParentReferenceCallback => 'createClearDependentElementParentReferenceCallback',
799  // callback function used to get the correct record uid to be used in the error message
800  self::KEY_PurgeWithErrorMessageGetIdCallback => 'getElementIdCallback',
801  // callback function used to fetch the correct record uid on modifying the commandMap
802  self::KEY_UpdateGetIdCallback => 'getElementIdCallback',
803  // setting whether to use the uid of the live record instead of the workspace record
804  self::KEY_TransformDependentElementsToUseLiveId => FALSE
805  )
806  );
807  }
808 
817  protected function getScopeData($scope, $key) {
818  if (!isset($this->scopes[$scope])) {
819  throw new \RuntimeException('Scope "' . $scope . '" is not defined.', 1289342187);
820  }
821  return $this->scopes[$scope][$key];
822  }
823 
831  protected function getDependencyCallback($method, array $targetArguments = array()) {
833  'TYPO3\\CMS\\Version\\Dependency\\EventCallback',
834  $this->getElementEntityProcessor(), $method, $targetArguments
835  );
836  }
837 
845  protected function processCallback($method, array $callbackArguments) {
846  return call_user_func_array(array($this, $method), $callbackArguments);
847  }
848 
849 }
static mergeRecursiveWithOverrule(array &$original, array $overrule, $addKeys=TRUE, $includeEmptyValues=TRUE, $enableUnsetFeature=TRUE)
getCommonSetStagePropertiesCallback(ElementEntity $element)
Definition: CommandMap.php:691
applyWorkspacesSetStageBehaviour($table, $versionIdList, array $properties)
Definition: CommandMap.php:385
getDependencyCallback($method, array $targetArguments=array())
Definition: CommandMap.php:831
getElementSwapPropertiesCallback(ElementEntity $element)
Definition: CommandMap.php:629
addWorkspacesSwapElements(\TYPO3\CMS\Version\Dependency\DependencyResolver $dependency, $table, $liveId, array $properties)
Definition: CommandMap.php:321
addWorkspacesSetStageElements(\TYPO3\CMS\Version\Dependency\DependencyResolver $dependency, $table, $versionId, array $properties)
Definition: CommandMap.php:427
setWorkspacesChangeStageMode($workspacesChangeStageMode)
Definition: CommandMap.php:202
getElementIdCallback(ElementEntity $element)
Definition: CommandMap.php:619
setWorkspacesSwapMode($workspacesSwapMode)
Definition: CommandMap.php:190
__construct(\TYPO3\CMS\Version\Hook\DataHandlerHook $parent, \TYPO3\CMS\Core\DataHandling\DataHandler $tceMain, array $commandMap, $workspace)
Definition: CommandMap.php:94
processCallback($method, array $callbackArguments)
Definition: CommandMap.php:845
static trimExplode($delim, $string, $removeEmptyValues=FALSE, $limit=0)
setWorkspacesConsiderReferences($workspacesConsiderReferences)
Definition: CommandMap.php:214
static getRecordTitle($table, $row, $prep=FALSE, $forceResult=TRUE)
getElementSetStagePropertiesCallback(ElementEntity $element)
Definition: CommandMap.php:681
explodeSetStage($table, $versionIdList, array $properties)
Definition: CommandMap.php:463
applyWorkspacesSwapBehaviour($table, $liveId, array $properties)
Definition: CommandMap.php:294
getCommonClearPropertiesCallback(ElementEntity $element)
Definition: CommandMap.php:641
invokeWorkspacesSetStageItems($callbackMethod, array $arguments=array())
Definition: CommandMap.php:344
setParent(\TYPO3\CMS\Version\Hook\DataHandlerHook $parent)
Definition: CommandMap.php:140
getElementLiveIdCallback(ElementEntity $element)
Definition: CommandMap.php:609
getCommonSwapPropertiesCallback(ElementEntity $element)
Definition: CommandMap.php:656
invokeWorkspacesSwapItems($callbackMethod, array $arguments=array())
Definition: CommandMap.php:253
setTceMain(\TYPO3\CMS\Core\DataHandling\DataHandler $tceMain)
Definition: CommandMap.php:160