‪TYPO3CMS  10.4
ActionHandler.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
31 
36 {
40  protected ‪$stageService;
41 
45  protected ‪$workspaceService;
46 
50  public function ‪__construct()
51  {
52  $this->stageService = GeneralUtility::makeInstance(StagesService::class);
53  $this->workspaceService = GeneralUtility::makeInstance(WorkspaceService::class);
54  }
55 
62  public function ‪generateWorkspacePreviewLink($uid)
63  {
64  return GeneralUtility::makeInstance(PreviewUriBuilder::class)->buildUriForPage((int)$uid, 0);
65  }
66 
74  {
75  return GeneralUtility::makeInstance(PreviewUriBuilder::class)->buildUrisForAllLanguagesOfPage((int)$uid);
76  }
77 
86  public function ‪swapSingleRecord($table, $t3ver_oid, $orig_uid)
87  {
88  $cmd = [];
89  $cmd[$table][$t3ver_oid]['version'] = [
90  'action' => 'swap',
91  'swapWith' => $orig_uid,
92  'swapIntoWS' => 1
93  ];
94  $this->‪processTcaCmd($cmd);
95  }
96 
104  public function ‪deleteSingleRecord($table, $uid)
105  {
106  $cmd = [];
107  $cmd[$table][$uid]['version'] = [
108  'action' => 'clearWSID'
109  ];
110  $this->‪processTcaCmd($cmd);
111  }
112 
120  public function ‪viewSingleRecord($table, $uid)
121  {
122  return GeneralUtility::makeInstance(PreviewUriBuilder::class)->buildUriForElement($table, $uid);
123  }
124 
131  public function ‪executeSelectionAction($parameter)
132  {
133  $result = [];
134 
135  if (empty($parameter->action) || empty($parameter->selection)) {
136  $result['error'] = 'No action or record selection given';
137  return $result;
138  }
139 
140  $commands = [];
141  $swapIntoWorkspace = ($parameter->action === 'swap');
142  if ($parameter->action === 'publish' || $swapIntoWorkspace) {
143  $commands = $this->‪getPublishSwapCommands($parameter->selection, $swapIntoWorkspace);
144  } elseif ($parameter->action === 'discard') {
145  $commands = $this->‪getFlushCommands($parameter->selection);
146  }
147 
148  $result = $this->‪processTcaCmd($commands);
149  $result['total'] = count($commands);
150  return $result;
151  }
152 
160  protected function ‪getPublishSwapCommands(array $selection, $swapIntoWorkspace)
161  {
162  $commands = [];
163  foreach ($selection as $record) {
164  $commands[$record->table][$record->liveId]['version'] = [
165  'action' => 'swap',
166  'swapWith' => $record->versionId,
167  'swapIntoWS' => (bool)$swapIntoWorkspace,
168  ];
169  }
170  return $commands;
171  }
172 
179  protected function ‪getFlushCommands(array $selection)
180  {
181  $commands = [];
182  foreach ($selection as $record) {
183  $commands[$record->table][$record->versionId]['version'] = [
184  'action' => 'clearWSID',
185  ];
186  }
187  return $commands;
188  }
189 
195  public function ‪saveColumnModel($model)
196  {
197  $data = [];
198  foreach ($model as $column) {
199  $data[$column->column] = [
200  'position' => $column->position,
201  'hidden' => $column->hidden
202  ];
203  }
204  $this->‪getBackendUser()->uc['moduleData']['Workspaces'][$this->‪getBackendUser()->workspace]['columns'] = $data;
205  $this->‪getBackendUser()->‪writeUC();
206  }
207 
208  public function ‪loadColumnModel()
209  {
210  if (is_array($this->‪getBackendUser()->uc['moduleData']['Workspaces'][$this->‪getBackendUser()->workspace]['columns'])) {
211  return $this->‪getBackendUser()->uc['moduleData']['Workspaces'][$this->‪getBackendUser()->workspace]['columns'];
212  }
213  return [];
214  }
215 
221  public function ‪saveLanguageSelection($language)
222  {
223  if (‪MathUtility::canBeInterpretedAsInteger($language) === false && $language !== 'all') {
224  $language = 'all';
225  }
226  $this->‪getBackendUser()->uc['moduleData']['Workspaces'][$this->‪getBackendUser()->workspace]['language'] = $language;
227  $this->‪getBackendUser()->‪writeUC();
228  }
229 
238  public function ‪sendToNextStageWindow($uid, $table, $t3ver_oid)
239  {
240  $elementRecord = ‪BackendUtility::getRecord($table, $uid);
241  if (is_array($elementRecord)) {
242  $workspaceRecord = ‪WorkspaceRecord::get($elementRecord['t3ver_wsid']);
243  $nextStageRecord = $workspaceRecord->getNextStage($elementRecord['t3ver_stage']);
244  if ($nextStageRecord !== null) {
245  $this->stageService->getRecordService()->add($table, $uid);
246  $result = $this->‪getSentToStageWindow($nextStageRecord);
247  $result['affects'] = [
248  'table' => $table,
249  'nextStage' => $nextStageRecord->getUid(),
250  't3ver_oid' => $t3ver_oid,
251  'uid' => $uid
252  ];
253  } else {
254  $result = $this->‪getErrorResponse('error.stageId.invalid', 1291111644);
255  }
256  } else {
257  $result = $this->‪getErrorResponse('error.sendToNextStage.noRecordFound', 1287264776);
258  }
259  return $result;
260  }
261 
269  public function ‪sendToPrevStageWindow($uid, $table)
270  {
271  $elementRecord = ‪BackendUtility::getRecord($table, $uid);
272  if (is_array($elementRecord)) {
273  $workspaceRecord = ‪WorkspaceRecord::get($elementRecord['t3ver_wsid']);
274  $stageRecord = $workspaceRecord->getStage($elementRecord['t3ver_stage']);
275 
276  if ($stageRecord !== null) {
277  if (!$stageRecord->isEditStage()) {
278  $this->stageService->getRecordService()->add($table, $uid);
279  $previousStageRecord = $stageRecord->getPrevious();
280  $result = $this->‪getSentToStageWindow($previousStageRecord);
281  $result['affects'] = [
282  'table' => $table,
283  'uid' => $uid,
284  'nextStage' => $previousStageRecord->getUid()
285  ];
286  } else {
287  // element is already in edit stage, there is no prev stage - return an error message
288  $result = $this->‪getErrorResponse('error.sendToPrevStage.noPreviousStage', 1287264746);
289  }
290  } else {
291  $result = $this->‪getErrorResponse('error.stageId.invalid', 1291111644);
292  }
293  } else {
294  $result = $this->‪getErrorResponse('error.sendToNextStage.noRecordFound', 1287264765);
295  }
296  return $result;
297  }
298 
306  public function ‪sendToSpecificStageWindow($nextStageId, array $elements)
307  {
308  foreach ($elements as $element) {
309  $this->stageService->getRecordService()->add(
310  $element->table,
311  $element->uid
312  );
313  }
314 
315  $result = $this->‪getSentToStageWindow($nextStageId);
316  $result['affects'] = [
317  'nextStage' => $nextStageId
318  ];
319  return $result;
320  }
321 
331  public function ‪getRecipientList(array $uidOfRecipients, $additionalRecipients, $stageId)
332  {
333  $stageRecord = ‪WorkspaceRecord::get($this->‪getCurrentWorkspace())->‪getStage($stageId);
334 
335  if ($stageRecord === null) {
336  throw new \InvalidArgumentException(
337  $this->‪getLanguageService()->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf:error.stageId.integer'),
338  1476044776
339  );
340  }
341 
342  $recipients = [];
343  $finalRecipients = [];
344  $backendUserIds = $stageRecord->getAllRecipients();
345  foreach ($uidOfRecipients as $userUid) {
346  // Ensure that only configured backend users are considered
347  if (!in_array($userUid, $backendUserIds)) {
348  continue;
349  }
350  $beUserRecord = ‪BackendUtility::getRecord('be_users', (int)$userUid);
351  if (is_array($beUserRecord) && $beUserRecord['email'] !== '') {
352  $uc = $beUserRecord['uc'] ? unserialize($beUserRecord['uc'], ['allowed_classes' => false]) : [];
353  $recipients[$beUserRecord['email']] = [
354  'email' => $beUserRecord['email'],
355  'lang' => $uc['lang'] ?? $beUserRecord['lang']
356  ];
357  }
358  }
359 
360  if ($stageRecord->hasPreselection() && !$stageRecord->isPreselectionChangeable()) {
361  $preselectedBackendUsers = $this->stageService->getBackendUsers(
362  implode(',', $this->stageService->getPreselectedRecipients($stageRecord))
363  );
364 
365  foreach ($preselectedBackendUsers as $preselectedBackendUser) {
366  if (empty($preselectedBackendUser['email']) || !GeneralUtility::validEmail($preselectedBackendUser['email'])) {
367  continue;
368  }
369  if (!isset($recipients[$preselectedBackendUser['email']])) {
370  $uc = (!empty($preselectedBackendUser['uc']) ? unserialize($preselectedBackendUser['uc'], ['allowed_classes' => false]) : []);
371  $recipients[$preselectedBackendUser['email']] = [
372  'email' => $preselectedBackendUser['email'],
373  'lang' => $uc['lang'] ?? $preselectedBackendUser['lang']
374  ];
375  }
376  }
377  }
378 
379  if ($additionalRecipients !== '') {
380  $emails = ‪GeneralUtility::trimExplode(LF, $additionalRecipients, true);
381  $additionalRecipients = [];
382  foreach ($emails as $email) {
383  $additionalRecipients[$email] = ['email' => $email];
384  }
385  } else {
386  $additionalRecipients = [];
387  }
388  // We merge $recipients on top of $additionalRecipients because $recipients
389  // possibly is more complete with a user language. Furthermore, the list of
390  // recipients is automatically unique since we indexed $additionalRecipients
391  // and $recipients with the email address
392  $allRecipients = array_merge($additionalRecipients, $recipients);
393  foreach ($allRecipients as $email => $recipientInformation) {
394  if (GeneralUtility::validEmail((string)$email)) {
395  $finalRecipients[] = $recipientInformation;
396  }
397  }
398  return $finalRecipients;
399  }
400 
407  public function ‪discardStagesFromPage($pageId)
408  {
409  $cmdMapArray = [];
410  $workspaceItemsArray = $this->workspaceService->selectVersionsInWorkspace(
411  $this->stageService->getWorkspaceId(),
412  $filter = 1,
413  $stage = -99,
414  $pageId,
415  $recursionLevel = 0,
416  $selectionType = 'tables_modify'
417  );
418  foreach ($workspaceItemsArray as $tableName => $items) {
419  foreach ($items as $item) {
420  $cmdMapArray[$tableName][$item['uid']]['version']['action'] = 'clearWSID';
421  }
422  }
423  $this->‪processTcaCmd($cmdMapArray);
424  return [
425  'success' => true
426  ];
427  }
428 
443  public function ‪sentCollectionToStage(\stdClass $parameters)
444  {
445  $cmdMapArray = [];
446  $comment = $parameters->comments;
447  $stageId = $parameters->stageId;
448  if (‪MathUtility::canBeInterpretedAsInteger($stageId) === false) {
449  throw new \InvalidArgumentException('Missing "stageId" in $parameters array.', 1319488194);
450  }
451  if (!is_object($parameters->affects) || empty($parameters->affects)) {
452  throw new \InvalidArgumentException('Missing "affected items" in $parameters array.', 1319488195);
453  }
454  $recipients = $this->‪getRecipientList((array)$parameters->recipients, $parameters->additional, $stageId);
455  foreach ($parameters->affects as $tableName => $items) {
456  foreach ($items as $item) {
457  // Publishing uses live id in command map
459  $cmdMapArray[$tableName][$item->t3ver_oid]['version']['action'] = 'swap';
460  $cmdMapArray[$tableName][$item->t3ver_oid]['version']['swapWith'] = $item->uid;
461  $cmdMapArray[$tableName][$item->t3ver_oid]['version']['comment'] = $comment;
462  $cmdMapArray[$tableName][$item->t3ver_oid]['version']['notificationAlternativeRecipients'] = $recipients;
463  } else {
464  // Setting stage uses version id in command map
465  $cmdMapArray[$tableName][$item->uid]['version']['action'] = 'setStage';
466  $cmdMapArray[$tableName][$item->uid]['version']['stageId'] = $stageId;
467  $cmdMapArray[$tableName][$item->uid]['version']['comment'] = $comment;
468  $cmdMapArray[$tableName][$item->uid]['version']['notificationAlternativeRecipients'] = $recipients;
469  }
470  }
471  }
472  $this->‪processTcaCmd($cmdMapArray);
473  return [
474  'success' => true,
475  // force refresh after publishing changes
476  'refreshLivePanel' => $parameters->stageId == -20
477  ];
478  }
479 
486  protected function ‪processTcaCmd(array $cmdMapArray)
487  {
488  $result = [];
489 
490  if (empty($cmdMapArray)) {
491  $result['error'] = 'No commands given to be processed';
492  return $result;
493  }
494 
495  $dataHandler = GeneralUtility::makeInstance(DataHandler::class);
496  $dataHandler->start([], $cmdMapArray);
497  $dataHandler->process_cmdmap();
498 
499  if ($dataHandler->errorLog) {
500  $result['error'] = implode('<br/>', $dataHandler->errorLog);
501  }
502 
503  return $result;
504  }
505 
521  public function ‪sendToNextStageExecute(\stdClass $parameters)
522  {
523  $cmdArray = [];
524  $setStageId = (int)$parameters->affects->nextStage;
525  $comments = $parameters->comments;
526  $table = $parameters->affects->table;
527  $uid = $parameters->affects->uid;
528  $t3ver_oid = $parameters->affects->t3ver_oid;
529 
530  $recipients = $this->getRecipientList((array)$parameters->recipients, $parameters->additional, $setStageId);
531  if ($setStageId === ‪StagesService::STAGE_PUBLISH_EXECUTE_ID) {
532  $cmdArray[$table][$t3ver_oid]['version']['action'] = 'swap';
533  $cmdArray[$table][$t3ver_oid]['version']['swapWith'] = $uid;
534  $cmdArray[$table][$t3ver_oid]['version']['comment'] = $comments;
535  $cmdArray[$table][$t3ver_oid]['version']['notificationAlternativeRecipients'] = $recipients;
536  } else {
537  $cmdArray[$table][$uid]['version']['action'] = 'setStage';
538  $cmdArray[$table][$uid]['version']['stageId'] = $setStageId;
539  $cmdArray[$table][$uid]['version']['comment'] = $comments;
540  $cmdArray[$table][$uid]['version']['notificationAlternativeRecipients'] = $recipients;
541  }
542  $this->‪processTcaCmd($cmdArray);
543  $result = [
544  'success' => true
545  ];
546 
547  return $result;
548  }
549 
564  public function ‪sendToPrevStageExecute(\stdClass $parameters)
565  {
566  $cmdArray = [];
567  $setStageId = $parameters->affects->nextStage;
568  $comments = $parameters->comments;
569  $table = $parameters->affects->table;
570  $uid = $parameters->affects->uid;
571 
572  $recipients = $this->‪getRecipientList((array)$parameters->recipients, $parameters->additional, $setStageId);
573  $cmdArray[$table][$uid]['version']['action'] = 'setStage';
574  $cmdArray[$table][$uid]['version']['stageId'] = $setStageId;
575  $cmdArray[$table][$uid]['version']['comment'] = $comments;
576  $cmdArray[$table][$uid]['version']['notificationAlternativeRecipients'] = $recipients;
577  $this->‪processTcaCmd($cmdArray);
578  $result = [
579  'success' => true
580  ];
581 
582  return $result;
583  }
584 
606  public function ‪sendToSpecificStageExecute(\stdClass $parameters)
607  {
608  $cmdArray = [];
609  $setStageId = (int)$parameters->affects->nextStage;
610  $comments = $parameters->comments;
611  $elements = $parameters->affects->elements;
612  $recipients = $this->getRecipientList((array)$parameters->recipients, $parameters->additional, $setStageId);
613  foreach ($elements as $element) {
614  // Avoid any action on records that have already been published to live
615  $elementRecord = ‪BackendUtility::getRecord($element->table, $element->uid);
616  if ((int)$elementRecord['t3ver_wsid'] === 0) {
617  continue;
618  }
619 
620  if ($setStageId === ‪StagesService::STAGE_PUBLISH_EXECUTE_ID) {
621  $cmdArray[$element->table][$element->t3ver_oid]['version']['action'] = 'swap';
622  $cmdArray[$element->table][$element->t3ver_oid]['version']['swapWith'] = $element->uid;
623  $cmdArray[$element->table][$element->t3ver_oid]['version']['comment'] = $comments;
624  $cmdArray[$element->table][$element->t3ver_oid]['version']['notificationAlternativeRecipients'] = $recipients;
625  } else {
626  $cmdArray[$element->table][$element->uid]['version']['action'] = 'setStage';
627  $cmdArray[$element->table][$element->uid]['version']['stageId'] = $setStageId;
628  $cmdArray[$element->table][$element->uid]['version']['comment'] = $comments;
629  $cmdArray[$element->table][$element->uid]['version']['notificationAlternativeRecipients'] = $recipients;
630  }
631  }
632  $this->‪processTcaCmd($cmdArray);
633  $result = [
634  'success' => true
635  ];
636  return $result;
637  }
638 
645  protected function ‪getSentToStageWindow($nextStage)
646  {
647  if (!$nextStage instanceof StageRecord) {
648  $nextStage = ‪WorkspaceRecord::get($this->‪getCurrentWorkspace())->‪getStage($nextStage);
649  }
650 
651  $result = [];
652  if ($nextStage->isDialogEnabled()) {
653  $result['sendMailTo'] = $this->‪getRecipientsOfStage($nextStage);
654  $result['additional'] = [
655  'type' => 'textarea',
656  'value' => ''
657  ];
658  }
659  $result['comments'] = [
660  'type' => 'textarea',
661  'value' => $nextStage->isInternal() ? '' : $nextStage->getDefaultComment()
662  ];
663 
664  return $result;
665  }
666 
673  protected function ‪getRecipientsOfStage($stageRecord)
674  {
675  if (!$stageRecord instanceof StageRecord) {
676  $stageRecord = ‪WorkspaceRecord::get($this->‪getCurrentWorkspace())->‪getStage($stageRecord);
677  }
678 
679  $result = [];
680  $allRecipients = $this->stageService->getResponsibleBeUser($stageRecord);
681  $preselectedRecipients = $this->stageService->‪getPreselectedRecipients($stageRecord);
682  $isPreselectionChangeable = $stageRecord->isPreselectionChangeable();
683 
684  foreach ($allRecipients as $backendUserId => $backendUser) {
685  if (empty($backendUser['email']) || !GeneralUtility::validEmail($backendUser['email'])) {
686  continue;
687  }
688 
689  $name = (!empty($backendUser['realName']) ? $backendUser['realName'] : $backendUser['username']);
690  $checked = in_array($backendUserId, $preselectedRecipients);
691  $disabled = ($checked && !$isPreselectionChangeable);
692 
693  $result[] = [
694  'label' => sprintf('%s (%s)', $name, $backendUser['email']),
695  'value' => $backendUserId,
696  'name' => 'recipients-' . $backendUserId,
697  'checked' => $checked,
698  'disabled' => $disabled
699  ];
700  }
701 
702  return $result;
703  }
704 
711  protected function ‪getDefaultCommentOfStage($stage)
712  {
713  $result = $this->stageService->getPropertyOfCurrentWorkspaceStage($stage, 'default_mailcomment');
714  return $result;
715  }
716 
723  public function ‪sendPageToPreviousStage($id)
724  {
725  $workspaceItemsArray = $this->workspaceService->selectVersionsInWorkspace(
726  $this->stageService->getWorkspaceId(),
727  $filter = 1,
728  $stage = -99,
729  $id,
730  $recursionLevel = 0,
731  $selectionType = 'tables_modify'
732  );
733  [$currentStage, $previousStage] = $this->stageService->getPreviousStageForElementCollection($workspaceItemsArray);
734  // get only the relevant items for processing
735  $workspaceItemsArray = $this->workspaceService->selectVersionsInWorkspace(
736  $this->stageService->getWorkspaceId(),
737  $filter = 1,
738  $currentStage['uid'],
739  $id,
740  $recursionLevel = 0,
741  $selectionType = 'tables_modify'
742  );
743  $stageFormFields = $this->‪getSentToStageWindow($previousStage['uid']);
744  $result = array_merge($stageFormFields, [
745  'title' => 'Status message: Page send to next stage - ID: ' . $id . ' - Next stage title: ' . $previousStage['title'],
746  'items' => $this->‪getSentToStageWindow($previousStage['uid']),
747  'affects' => $workspaceItemsArray,
748  'stageId' => $previousStage['uid']
749  ]);
750  return $result;
751  }
752 
757  public function ‪sendPageToNextStage($id)
758  {
759  $workspaceItemsArray = $this->workspaceService->selectVersionsInWorkspace(
760  $this->stageService->getWorkspaceId(),
761  $filter = 1,
762  $stage = -99,
763  $id,
764  $recursionLevel = 0,
765  $selectionType = 'tables_modify'
766  );
767  [$currentStage, $nextStage] = $this->stageService->getNextStageForElementCollection($workspaceItemsArray);
768  // get only the relevant items for processing
769  $workspaceItemsArray = $this->workspaceService->selectVersionsInWorkspace(
770  $this->stageService->getWorkspaceId(),
771  $filter = 1,
772  $currentStage['uid'],
773  $id,
774  $recursionLevel = 0,
775  $selectionType = 'tables_modify'
776  );
777  $stageFormFields = $this->‪getSentToStageWindow($nextStage['uid']);
778  $result = array_merge($stageFormFields, [
779  'title' => 'Status message: Page send to next stage - ID: ' . $id . ' - Next stage title: ' . $nextStage['title'],
780  'affects' => $workspaceItemsArray,
781  'stageId' => $nextStage['uid']
782  ]);
783  return $result;
784  }
785 
792  public function ‪updateStageChangeButtons($id)
793  {
794  // fetch the next and previous stage
795  $workspaceItemsArray = $this->workspaceService->selectVersionsInWorkspace(
796  $this->stageService->getWorkspaceId(),
797  $filter = 1,
798  $stage = -99,
799  $id,
800  $recursionLevel = 0,
801  $selectionType = 'tables_modify'
802  );
803  [, $nextStage] = $this->stageService->getNextStageForElementCollection($workspaceItemsArray);
804  [, $previousStage] = $this->stageService->getPreviousStageForElementCollection($workspaceItemsArray);
805 
806  $view = GeneralUtility::makeInstance(StandaloneView::class);
807  $extensionPath = ‪ExtensionManagementUtility::extPath('workspaces');
808  $view->setPartialRootPaths(['default' => $extensionPath . 'Resources/Private/Partials']);
809  $view->setTemplatePathAndFilename($extensionPath . 'Resources/Private/Templates/Preview/Ajax/StageButtons.html');
810  $request = $view->getRequest();
811  $request->setControllerExtensionName('workspaces');
812  $view->assignMultiple([
813  'enablePreviousStageButton' => is_array($previousStage) && !empty($previousStage),
814  'enableNextStageButton' => is_array($nextStage) && !empty($nextStage),
815  'enableDiscardStageButton' => is_array($nextStage) && !empty($nextStage) || is_array($previousStage) && !empty($previousStage),
816  'nextStage' => $nextStage['title'],
817  'nextStageId' => $nextStage['uid'],
818  'prevStage' => $previousStage['title'],
819  'prevStageId' => $previousStage['uid'],
820  ]);
821  $renderedView = $view->render();
822  return $renderedView;
823  }
824 
828  protected function ‪getBackendUser()
829  {
830  return ‪$GLOBALS['BE_USER'];
831  }
832 
836  protected function ‪getLanguageService()
837  {
838  return ‪$GLOBALS['LANG'];
839  }
840 
849  protected function ‪getErrorResponse($errorLabel, $errorCode = 0, $successFlagValue = false)
850  {
851  $localLangFile = 'LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf';
852  $response = [
853  'error' => [
854  'code' => $errorCode,
855  'message' => $this->‪getLanguageService()->‪sL($localLangFile . ':' . $errorLabel)
856  ],
857  'success' => $successFlagValue
858  ];
859  return $response;
860  }
861 
867  protected function ‪getCurrentWorkspace()
868  {
869  return $this->workspaceService->getCurrentWorkspace();
870  }
871 }
‪TYPO3\CMS\Core\DataHandling\DataHandler
Definition: DataHandler.php:84
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getRecipientsOfStage
‪array getRecipientsOfStage($stageRecord)
Definition: ActionHandler.php:671
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sendToSpecificStageWindow
‪array sendToSpecificStageWindow($nextStageId, array $elements)
Definition: ActionHandler.php:304
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\viewSingleRecord
‪string viewSingleRecord($table, $uid)
Definition: ActionHandler.php:118
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sendToPrevStageWindow
‪array sendToPrevStageWindow($uid, $table)
Definition: ActionHandler.php:267
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sentCollectionToStage
‪array sentCollectionToStage(\stdClass $parameters)
Definition: ActionHandler.php:441
‪TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger
‪static bool canBeInterpretedAsInteger($var)
Definition: MathUtility.php:74
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\writeUC
‪writeUC($variable='')
Definition: AbstractUserAuthentication.php:1120
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getBackendUser
‪BackendUserAuthentication getBackendUser()
Definition: ActionHandler.php:826
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getSentToStageWindow
‪array getSentToStageWindow($nextStage)
Definition: ActionHandler.php:643
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sendPageToNextStage
‪array sendPageToNextStage($id)
Definition: ActionHandler.php:755
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\saveColumnModel
‪saveColumnModel($model)
Definition: ActionHandler.php:193
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\swapSingleRecord
‪swapSingleRecord($table, $t3ver_oid, $orig_uid)
Definition: ActionHandler.php:84
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getFlushCommands
‪array getFlushCommands(array $selection)
Definition: ActionHandler.php:177
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getErrorResponse
‪array getErrorResponse($errorLabel, $errorCode=0, $successFlagValue=false)
Definition: ActionHandler.php:847
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sendPageToPreviousStage
‪array sendPageToPreviousStage($id)
Definition: ActionHandler.php:721
‪TYPO3\CMS\Workspaces\Domain\Record\WorkspaceRecord
Definition: WorkspaceRecord.php:26
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getLanguageService
‪LanguageService getLanguageService()
Definition: ActionHandler.php:834
‪TYPO3\CMS\Core\Localization\LanguageService\sL
‪string sL($input)
Definition: LanguageService.php:194
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sendToNextStageExecute
‪array sendToNextStageExecute(\stdClass $parameters)
Definition: ActionHandler.php:519
‪TYPO3\CMS\Workspaces\Service\StagesService\STAGE_PUBLISH_EXECUTE_ID
‪const STAGE_PUBLISH_EXECUTE_ID
Definition: StagesService.php:36
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\discardStagesFromPage
‪array discardStagesFromPage($pageId)
Definition: ActionHandler.php:405
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sendToNextStageWindow
‪array sendToNextStageWindow($uid, $table, $t3ver_oid)
Definition: ActionHandler.php:236
‪TYPO3\CMS\Workspaces\Domain\Record\StageRecord\getPreselectedRecipients
‪int[] getPreselectedRecipients()
Definition: StageRecord.php:340
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\generateWorkspacePreviewLink
‪string generateWorkspacePreviewLink($uid)
Definition: ActionHandler.php:60
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility
Definition: ExtensionManagementUtility.php:43
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getDefaultCommentOfStage
‪string getDefaultCommentOfStage($stage)
Definition: ActionHandler.php:709
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getCurrentWorkspace
‪int getCurrentWorkspace()
Definition: ActionHandler.php:865
‪TYPO3\CMS\Workspaces\Domain\Record\StageRecord
Definition: StageRecord.php:24
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\processTcaCmd
‪array processTcaCmd(array $cmdMapArray)
Definition: ActionHandler.php:484
‪TYPO3\CMS\Workspaces\Preview\PreviewUriBuilder
Definition: PreviewUriBuilder.php:43
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getPublishSwapCommands
‪array getPublishSwapCommands(array $selection, $swapIntoWorkspace)
Definition: ActionHandler.php:158
‪TYPO3\CMS\Workspaces\Controller\Remote
Definition: ActionHandler.php:16
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
Definition: BackendUserAuthentication.php:62
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sendToSpecificStageExecute
‪array sendToSpecificStageExecute(\stdClass $parameters)
Definition: ActionHandler.php:604
‪TYPO3\CMS\Backend\Utility\BackendUtility
Definition: BackendUtility.php:75
‪TYPO3\CMS\Workspaces\Service\WorkspaceService
Definition: WorkspaceService.php:36
‪TYPO3\CMS\Backend\Utility\BackendUtility\getRecord
‪static array null getRecord($table, $uid, $fields=' *', $where='', $useDeleteClause=true)
Definition: BackendUtility.php:95
‪TYPO3\CMS\Workspaces\Service\StagesService
Definition: StagesService.php:33
‪TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode
‪static string[] trimExplode($delim, $string, $removeEmptyValues=false, $limit=0)
Definition: GeneralUtility.php:1059
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\$stageService
‪StagesService $stageService
Definition: ActionHandler.php:39
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sendToPrevStageExecute
‪array sendToPrevStageExecute(\stdClass $parameters)
Definition: ActionHandler.php:562
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\updateStageChangeButtons
‪string updateStageChangeButtons($id)
Definition: ActionHandler.php:790
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\loadColumnModel
‪loadColumnModel()
Definition: ActionHandler.php:206
‪TYPO3\CMS\Fluid\View\StandaloneView
Definition: StandaloneView.php:34
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler
Definition: ActionHandler.php:36
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getRecipientList
‪array getRecipientList(array $uidOfRecipients, $additionalRecipients, $stageId)
Definition: ActionHandler.php:329
‪TYPO3\CMS\Core\Utility\MathUtility
Definition: MathUtility.php:22
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility\extPath
‪static string extPath($key, $script='')
Definition: ExtensionManagementUtility.php:127
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\generateWorkspacePreviewLinksForAllLanguages
‪array generateWorkspacePreviewLinksForAllLanguages($uid)
Definition: ActionHandler.php:71
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:42
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\saveLanguageSelection
‪saveLanguageSelection($language)
Definition: ActionHandler.php:219
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\__construct
‪__construct()
Definition: ActionHandler.php:48
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\executeSelectionAction
‪array executeSelectionAction($parameter)
Definition: ActionHandler.php:129
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\$workspaceService
‪WorkspaceService $workspaceService
Definition: ActionHandler.php:43
‪TYPO3\CMS\Workspaces\Domain\Record\WorkspaceRecord\get
‪static WorkspaceRecord get($uid, array $record=null)
Definition: WorkspaceRecord.php:69
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\deleteSingleRecord
‪deleteSingleRecord($table, $uid)
Definition: ActionHandler.php:102
‪TYPO3\CMS\Workspaces\Domain\Record\WorkspaceRecord\getStage
‪StageRecord null getStage($stageId)
Definition: WorkspaceRecord.php:146