‪TYPO3CMS  ‪main
ActionHandler.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 
20 use Psr\Http\Message\ServerRequestInterface;
21 use TYPO3\CMS\Backend\Utility\BackendUtility;
33 
38 {
39  public function ‪__construct(
40  protected readonly ‪StagesService $stagesService,
41  protected readonly ‪WorkspaceService $workspaceService,
42  protected readonly ‪BackendViewFactory $backendViewFactory,
43  ) {}
44 
52  {
53  return GeneralUtility::makeInstance(PreviewUriBuilder::class)->buildUriForPage((int)‪$uid, 0);
54  }
55 
63  {
64  return GeneralUtility::makeInstance(PreviewUriBuilder::class)->buildUrisForAllLanguagesOfPage((int)‪$uid);
65  }
66 
75  public function ‪publishSingleRecord($table, $t3ver_oid, $orig_uid)
76  {
77  $cmd = [];
78  $cmd[$table][$t3ver_oid]['version'] = [
79  'action' => 'publish',
80  'swapWith' => $orig_uid,
81  ];
82  $this->‪processTcaCmd($cmd);
83  }
84 
92  public function ‪deleteSingleRecord($table, ‪$uid)
93  {
94  $cmd = [];
95  $cmd[$table][‪$uid]['version'] = [
96  'action' => 'clearWSID',
97  ];
98  $this->‪processTcaCmd($cmd);
99  }
100 
108  public function ‪viewSingleRecord($table, ‪$uid)
109  {
110  return GeneralUtility::makeInstance(PreviewUriBuilder::class)->buildUriForElement($table, (int)‪$uid);
111  }
112 
119  public function ‪executeSelectionAction($parameter)
120  {
121  $result = [];
122 
123  if (empty($parameter->action) || empty($parameter->selection)) {
124  $result['error'] = 'No action or record selection given';
125  return $result;
126  }
127 
128  $commands = [];
129  if ($parameter->action === 'publish') {
130  $commands = $this->‪getPublishCommands($parameter->selection);
131  } elseif ($parameter->action === 'discard') {
132  $commands = $this->‪getFlushCommands($parameter->selection);
133  }
134 
135  $result = $this->‪processTcaCmd($commands);
136  $result['total'] = count($commands);
137  return $result;
138  }
139 
146  protected function ‪getPublishCommands(array $selection)
147  {
148  $commands = [];
149  foreach ($selection as ‪$record) {
150  $commands[‪$record->table][‪$record->liveId]['version'] = [
151  'action' => 'publish',
152  'swapWith' => ‪$record->versionId,
153  ];
154  }
155  return $commands;
156  }
157 
164  protected function ‪getFlushCommands(array $selection)
165  {
166  $commands = [];
167  foreach ($selection as ‪$record) {
168  $commands[‪$record->table][‪$record->versionId]['version'] = [
169  'action' => 'clearWSID',
170  ];
171  }
172  return $commands;
173  }
174 
180  public function ‪saveColumnModel($model)
181  {
182  $data = [];
183  foreach ($model as $column) {
184  $data[$column->column] = [
185  'position' => $column->position,
186  'hidden' => $column->hidden,
187  ];
188  }
189  $this->‪getBackendUser()->uc['moduleData']['Workspaces'][$this->‪getBackendUser()->workspace]['columns'] = $data;
190  $this->‪getBackendUser()->writeUC();
191  }
192 
193  public function ‪loadColumnModel()
194  {
195  if (is_array($this->‪getBackendUser()->uc['moduleData']['Workspaces'][$this->‪getBackendUser()->workspace]['columns'])) {
196  return $this->‪getBackendUser()->uc['moduleData']['Workspaces'][$this->‪getBackendUser()->workspace]['columns'];
197  }
198  return [];
199  }
200 
209  public function ‪sendToNextStageWindow(‪$uid, $table, $t3ver_oid)
210  {
211  ‪$uid = (int)‪$uid;
212  $elementRecord = BackendUtility::getRecord($table, ‪$uid);
213  if (is_array($elementRecord)) {
214  $workspaceRecord = ‪WorkspaceRecord::get($elementRecord['t3ver_wsid']);
215  $nextStageRecord = $workspaceRecord->getNextStage($elementRecord['t3ver_stage']);
216  if ($nextStageRecord !== null) {
217  $this->stagesService->getRecordService()->add($table, ‪$uid);
218  $result = $this->‪getSentToStageWindow($nextStageRecord);
219  $result['affects'] = [
220  'table' => $table,
221  'nextStage' => $nextStageRecord->getUid(),
222  't3ver_oid' => $t3ver_oid,
223  'uid' => ‪$uid,
224  ];
225  } else {
226  $result = $this->‪getErrorResponse('error.stageId.invalid', 1291111644);
227  }
228  } else {
229  $result = $this->‪getErrorResponse('error.sendToNextStage.noRecordFound', 1287264776);
230  }
231  return $result;
232  }
233 
241  public function ‪sendToPrevStageWindow(‪$uid, $table)
242  {
243  ‪$uid = (int)‪$uid;
244  $elementRecord = BackendUtility::getRecord($table, ‪$uid);
245  if (is_array($elementRecord)) {
246  $workspaceRecord = ‪WorkspaceRecord::get($elementRecord['t3ver_wsid']);
247  $stageRecord = $workspaceRecord->getStage($elementRecord['t3ver_stage']);
248 
249  if ($stageRecord !== null) {
250  if (!$stageRecord->isEditStage()) {
251  $this->stagesService->getRecordService()->add($table, ‪$uid);
252  $previousStageRecord = $stageRecord->getPrevious();
253  if ($previousStageRecord === null) {
254  return $this->‪getErrorResponse('error.sendToPrevStage.noPreviousStage', 1287264747);
255  }
256  $result = $this->‪getSentToStageWindow($previousStageRecord);
257  $result['affects'] = [
258  'table' => $table,
259  'uid' => ‪$uid,
260  'nextStage' => $previousStageRecord->getUid(),
261  ];
262  } else {
263  // element is already in edit stage, there is no prev stage - return an error message
264  $result = $this->‪getErrorResponse('error.sendToPrevStage.noPreviousStage', 1287264746);
265  }
266  } else {
267  $result = $this->‪getErrorResponse('error.stageId.invalid', 1291111644);
268  }
269  } else {
270  $result = $this->‪getErrorResponse('error.sendToNextStage.noRecordFound', 1287264765);
271  }
272  return $result;
273  }
274 
282  public function ‪sendToSpecificStageWindow($nextStageId, array $elements)
283  {
284  foreach ($elements as $element) {
285  $this->stagesService->getRecordService()->add(
286  $element->table,
287  (int)$element->uid
288  );
289  }
290 
291  $result = $this->‪getSentToStageWindow($nextStageId);
292  $result['affects'] = [
293  'nextStage' => $nextStageId,
294  ];
295  return $result;
296  }
297 
307  public function ‪getRecipientList(array $uidOfRecipients, $additionalRecipients, $stageId)
308  {
309  $stageRecord = ‪WorkspaceRecord::get($this->‪getCurrentWorkspace())->getStage($stageId);
310 
311  if ($stageRecord === null) {
312  throw new \InvalidArgumentException(
313  $this->‪getLanguageService()->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf:error.stageId.integer'),
314  1476044776
315  );
316  }
317 
318  $recipients = [];
319  $finalRecipients = [];
320  $backendUserIds = $stageRecord->getAllRecipients();
321  foreach ($uidOfRecipients as $userUid) {
322  // Ensure that only configured backend users are considered
323  if (!in_array($userUid, $backendUserIds)) {
324  continue;
325  }
326  $beUserRecord = BackendUtility::getRecord('be_users', (int)$userUid);
327  if (is_array($beUserRecord) && $beUserRecord['email'] !== '') {
328  $recipients[$beUserRecord['email']] = [
329  'email' => $beUserRecord['email'],
330  'lang' => $beUserRecord['lang'],
331  ];
332  }
333  }
334 
335  if ($stageRecord->hasPreselection() && !$stageRecord->isPreselectionChangeable()) {
336  $preselectedBackendUsers = $this->stagesService->getBackendUsers(
337  $this->stagesService->getPreselectedRecipients($stageRecord)
338  );
339 
340  foreach ($preselectedBackendUsers as $preselectedBackendUser) {
341  if (empty($preselectedBackendUser['email']) || !GeneralUtility::validEmail($preselectedBackendUser['email'])) {
342  continue;
343  }
344  if (!isset($recipients[$preselectedBackendUser['email']])) {
345  $uc = (!empty($preselectedBackendUser['uc']) ? unserialize($preselectedBackendUser['uc'], ['allowed_classes' => false]) : []);
346  $recipients[$preselectedBackendUser['email']] = [
347  'email' => $preselectedBackendUser['email'],
348  'lang' => $uc['lang'] ?? $preselectedBackendUser['lang'],
349  ];
350  }
351  }
352  }
353 
354  if ($additionalRecipients !== '') {
355  $emails = ‪GeneralUtility::trimExplode(LF, $additionalRecipients, true);
356  $additionalRecipients = [];
357  foreach ($emails as $email) {
358  $additionalRecipients[$email] = ['email' => $email];
359  }
360  } else {
361  $additionalRecipients = [];
362  }
363  // We merge $recipients on top of $additionalRecipients because $recipients
364  // possibly is more complete with a user language. Furthermore, the list of
365  // recipients is automatically unique since we indexed $additionalRecipients
366  // and $recipients with the email address
367  $allRecipients = array_merge($additionalRecipients, $recipients);
368  foreach ($allRecipients as $email => $recipientInformation) {
369  if (GeneralUtility::validEmail((string)$email)) {
370  $finalRecipients[] = $recipientInformation;
371  }
372  }
373  return $finalRecipients;
374  }
375 
382  public function ‪discardStagesFromPage($pageId)
383  {
384  $cmdMapArray = [];
385  $workspaceItemsArray = $this->workspaceService->selectVersionsInWorkspace(
386  $this->stagesService->getWorkspaceId(),
387  -99,
388  $pageId,
389  0,
390  'tables_modify'
391  );
392  foreach ($workspaceItemsArray as $tableName => $items) {
393  foreach ($items as $item) {
394  $cmdMapArray[$tableName][$item['uid']]['version']['action'] = 'clearWSID';
395  }
396  }
397  $this->‪processTcaCmd($cmdMapArray);
398  return [
399  'success' => true,
400  ];
401  }
402 
417  public function ‪sentCollectionToStage(\stdClass $parameters)
418  {
419  $cmdMapArray = [];
420  $comment = $parameters->comments;
421  $stageId = $parameters->stageId;
422  if (‪MathUtility::canBeInterpretedAsInteger($stageId) === false) {
423  throw new \InvalidArgumentException('Missing "stageId" in $parameters array.', 1319488194);
424  }
425  if (!is_object($parameters->affects) || empty($parameters->affects)) {
426  throw new \InvalidArgumentException('Missing "affected items" in $parameters array.', 1319488195);
427  }
428  $recipients = $this->‪getRecipientList((array)($parameters->recipients ?? []), (string)($parameters->additional ?? ''), $stageId);
429  foreach ($parameters->affects as $tableName => $items) {
430  foreach ($items as $item) {
431  // Publishing uses live id in command map
433  $cmdMapArray[$tableName][$item->t3ver_oid]['version']['action'] = 'publish';
434  $cmdMapArray[$tableName][$item->t3ver_oid]['version']['swapWith'] = $item->uid;
435  $cmdMapArray[$tableName][$item->t3ver_oid]['version']['comment'] = $comment;
436  $cmdMapArray[$tableName][$item->t3ver_oid]['version']['notificationAlternativeRecipients'] = $recipients;
437  } else {
438  // Setting stage uses version id in command map
439  $cmdMapArray[$tableName][$item->uid]['version']['action'] = 'setStage';
440  $cmdMapArray[$tableName][$item->uid]['version']['stageId'] = $stageId;
441  $cmdMapArray[$tableName][$item->uid]['version']['comment'] = $comment;
442  $cmdMapArray[$tableName][$item->uid]['version']['notificationAlternativeRecipients'] = $recipients;
443  }
444  }
445  }
446  $this->‪processTcaCmd($cmdMapArray);
447  return [
448  'success' => true,
449  // force refresh after publishing changes
450  'refreshLivePanel' => (int)$parameters->stageId === ‪StagesService::STAGE_PUBLISH_EXECUTE_ID,
451  ];
452  }
453 
459  protected function ‪processTcaCmd(array $cmdMapArray)
460  {
461  $result = [];
462 
463  if (empty($cmdMapArray)) {
464  $result['error'] = 'No commands given to be processed';
465  return $result;
466  }
467 
468  $dataHandler = GeneralUtility::makeInstance(DataHandler::class);
469  $dataHandler->start([], $cmdMapArray);
470  $dataHandler->process_cmdmap();
471 
472  if ($dataHandler->errorLog) {
473  $result['error'] = implode('<br/>', $dataHandler->errorLog);
474  }
475 
476  return $result;
477  }
478 
494  public function ‪sendToNextStageExecute(\stdClass $parameters)
495  {
496  $cmdArray = [];
497  $setStageId = (int)$parameters->affects->nextStage;
498  $comments = $parameters->comments;
499  $table = $parameters->affects->table;
500  ‪$uid = $parameters->affects->uid;
501  $t3ver_oid = $parameters->affects->t3ver_oid;
502 
503  $recipients = $this->getRecipientList((array)($parameters->recipients ?? []), (string)($parameters->additional ?? ''), $setStageId);
504  if ($setStageId === ‪StagesService::STAGE_PUBLISH_EXECUTE_ID) {
505  $cmdArray[$table][$t3ver_oid]['version']['action'] = 'publish';
506  $cmdArray[$table][$t3ver_oid]['version']['swapWith'] = ‪$uid;
507  $cmdArray[$table][$t3ver_oid]['version']['comment'] = $comments;
508  $cmdArray[$table][$t3ver_oid]['version']['notificationAlternativeRecipients'] = $recipients;
509  } else {
510  $cmdArray[$table][‪$uid]['version']['action'] = 'setStage';
511  $cmdArray[$table][‪$uid]['version']['stageId'] = $setStageId;
512  $cmdArray[$table][‪$uid]['version']['comment'] = $comments;
513  $cmdArray[$table][‪$uid]['version']['notificationAlternativeRecipients'] = $recipients;
514  }
515  $this->‪processTcaCmd($cmdArray);
516  $result = [
517  'success' => true,
518  ];
519 
520  return $result;
521  }
522 
537  public function ‪sendToPrevStageExecute(\stdClass $parameters)
538  {
539  $cmdArray = [];
540  $setStageId = $parameters->affects->nextStage;
541  $comments = $parameters->comments;
542  $table = $parameters->affects->table;
543  ‪$uid = $parameters->affects->uid;
544 
545  $recipients = $this->‪getRecipientList((array)($parameters->recipients ?? []), (string)($parameters->additional ?? ''), $setStageId);
546  $cmdArray[$table][‪$uid]['version']['action'] = 'setStage';
547  $cmdArray[$table][‪$uid]['version']['stageId'] = $setStageId;
548  $cmdArray[$table][‪$uid]['version']['comment'] = $comments;
549  $cmdArray[$table][‪$uid]['version']['notificationAlternativeRecipients'] = $recipients;
550  $this->‪processTcaCmd($cmdArray);
551  $result = [
552  'success' => true,
553  ];
554 
555  return $result;
556  }
557 
579  public function ‪sendToSpecificStageExecute(\stdClass $parameters)
580  {
581  $cmdArray = [];
582  $setStageId = (int)$parameters->affects->nextStage;
583  $comments = $parameters->comments;
584  $elements = $parameters->affects->elements;
585  $recipients = $this->getRecipientList((array)($parameters->recipients ?? []), (string)($parameters->additional ?? ''), $setStageId);
586  foreach ($elements as $element) {
587  // Avoid any action on records that have already been published to live
588  $elementRecord = BackendUtility::getRecord($element->table, $element->uid);
589  if ((int)$elementRecord['t3ver_wsid'] === 0) {
590  continue;
591  }
592 
593  if ($setStageId === ‪StagesService::STAGE_PUBLISH_EXECUTE_ID) {
594  $cmdArray[$element->table][$element->t3ver_oid]['version']['action'] = 'publish';
595  $cmdArray[$element->table][$element->t3ver_oid]['version']['swapWith'] = $element->uid;
596  $cmdArray[$element->table][$element->t3ver_oid]['version']['comment'] = $comments;
597  $cmdArray[$element->table][$element->t3ver_oid]['version']['notificationAlternativeRecipients'] = $recipients;
598  } else {
599  $cmdArray[$element->table][$element->uid]['version']['action'] = 'setStage';
600  $cmdArray[$element->table][$element->uid]['version']['stageId'] = $setStageId;
601  $cmdArray[$element->table][$element->uid]['version']['comment'] = $comments;
602  $cmdArray[$element->table][$element->uid]['version']['notificationAlternativeRecipients'] = $recipients;
603  }
604  }
605  $this->‪processTcaCmd($cmdArray);
606  $result = [
607  'success' => true,
608  ];
609  return $result;
610  }
611 
618  protected function ‪getSentToStageWindow($nextStage)
619  {
620  if (!$nextStage instanceof ‪StageRecord) {
621  $nextStage = ‪WorkspaceRecord::get($this->‪getCurrentWorkspace())->getStage((int)$nextStage);
622  }
623 
624  $result = [];
625  // TODO: $nextStage might be null, error ignored in phpstan.neon
626  if ($nextStage->isDialogEnabled()) {
627  $result['sendMailTo'] = $this->‪getRecipientsOfStage($nextStage);
628  $result['additional'] = [
629  'type' => 'textarea',
630  'value' => '',
631  ];
632  }
633  $result['comments'] = [
634  'type' => 'textarea',
635  'value' => $nextStage->isInternal() ? '' : $nextStage->getDefaultComment(),
636  ];
637 
638  return $result;
639  }
640 
647  protected function ‪getRecipientsOfStage($stageRecord)
648  {
649  if (!$stageRecord instanceof ‪StageRecord) {
650  $stageRecord = ‪WorkspaceRecord::get($this->‪getCurrentWorkspace())->getStage($stageRecord);
651  }
652 
653  $result = [];
654  $allRecipients = $this->stagesService->getResponsibleBeUser($stageRecord);
655  $preselectedRecipients = $this->stagesService->getPreselectedRecipients($stageRecord);
656  $isPreselectionChangeable = $stageRecord->isPreselectionChangeable();
657 
658  foreach ($allRecipients as $backendUserId => $backendUser) {
659  if (empty($backendUser['email']) || !GeneralUtility::validEmail($backendUser['email'])) {
660  continue;
661  }
662 
663  $name = (!empty($backendUser['realName']) ? $backendUser['realName'] : $backendUser['username']);
664  $checked = in_array($backendUserId, $preselectedRecipients);
665  $disabled = ($checked && !$isPreselectionChangeable);
666 
667  $result[] = [
668  'label' => sprintf('%s (%s)', $name, $backendUser['email']),
669  'value' => $backendUserId,
670  'name' => 'recipients-' . $backendUserId,
671  'checked' => $checked,
672  'disabled' => $disabled,
673  ];
674  }
675 
676  return $result;
677  }
678 
685  protected function ‪getDefaultCommentOfStage($stage)
686  {
687  $result = $this->stagesService->getPropertyOfCurrentWorkspaceStage($stage, 'default_mailcomment');
688  return $result;
689  }
690 
697  public function ‪sendPageToPreviousStage($id)
698  {
699  $workspaceItemsArray = $this->workspaceService->selectVersionsInWorkspace(
700  $this->stagesService->getWorkspaceId(),
701  -99,
702  $id,
703  0,
704  'tables_modify'
705  );
706  [$currentStage, $previousStage] = $this->stagesService->getPreviousStageForElementCollection($workspaceItemsArray);
707  // get only the relevant items for processing
708  $workspaceItemsArray = $this->workspaceService->selectVersionsInWorkspace(
709  $this->stagesService->getWorkspaceId(),
710  $currentStage['uid'],
711  $id,
712  0,
713  'tables_modify'
714  );
715  $stageFormFields = $this->‪getSentToStageWindow($previousStage['uid']);
716  $result = array_merge($stageFormFields, [
717  'title' => 'Status message: Page send to next stage - ID: ' . $id . ' - Next stage title: ' . $previousStage['title'],
718  'items' => $this->‪getSentToStageWindow($previousStage['uid']),
719  'affects' => $workspaceItemsArray,
720  'stageId' => $previousStage['uid'],
721  ]);
722  return $result;
723  }
724 
729  public function ‪sendPageToNextStage($id)
730  {
731  $workspaceItemsArray = $this->workspaceService->selectVersionsInWorkspace(
732  $this->stagesService->getWorkspaceId(),
733  -99,
734  $id,
735  0,
736  'tables_modify'
737  );
738  [$currentStage, $nextStage] = $this->stagesService->getNextStageForElementCollection($workspaceItemsArray);
739  // get only the relevant items for processing
740  $workspaceItemsArray = $this->workspaceService->selectVersionsInWorkspace(
741  $this->stagesService->getWorkspaceId(),
742  $currentStage['uid'],
743  $id,
744  0,
745  'tables_modify'
746  );
747  $stageFormFields = $this->‪getSentToStageWindow($nextStage['uid']);
748  $result = array_merge($stageFormFields, [
749  'title' => 'Status message: Page send to next stage - ID: ' . $id . ' - Next stage title: ' . $nextStage['title'],
750  'affects' => $workspaceItemsArray,
751  'stageId' => $nextStage['uid'],
752  ]);
753  return $result;
754  }
755 
760  public function ‪updateStageChangeButtons(int $id, ServerRequestInterface $request): string
761  {
762  // Fetch next and previous stage
763  $workspaceItemsArray = $this->workspaceService->selectVersionsInWorkspace(
764  $this->stagesService->getWorkspaceId(),
765  -99,
766  $id,
767  0,
768  'tables_modify'
769  );
770  [, $nextStage] = $this->stagesService->getNextStageForElementCollection($workspaceItemsArray);
771  [, $previousStage] = $this->stagesService->getPreviousStageForElementCollection($workspaceItemsArray);
772  $view = $this->backendViewFactory->create($request, ['typo3/cms-workspaces']);
773  $view->assignMultiple([
774  'enablePreviousStageButton' => is_array($previousStage) && !empty($previousStage),
775  'enableNextStageButton' => is_array($nextStage) && !empty($nextStage),
776  'enableDiscardStageButton' => (is_array($nextStage) && !empty($nextStage)) || (is_array($previousStage) && !empty($previousStage)),
777  'nextStage' => $nextStage['title'] ?? '',
778  'nextStageId' => $nextStage['uid'] ?? 0,
779  'prevStage' => $previousStage['title'] ?? '',
780  'prevStageId' => $previousStage['uid'] ?? 0,
781  ]);
782  return $view->render('Preview/Ajax/StageButtons');
783  }
784 
793  protected function ‪getErrorResponse($errorLabel, $errorCode = 0, $successFlagValue = false)
794  {
795  $localLangFile = 'LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf';
796  $response = [
797  'error' => [
798  'code' => $errorCode,
799  'message' => $this->‪getLanguageService()->sL($localLangFile . ':' . $errorLabel),
800  ],
801  'success' => $successFlagValue,
802  ];
803  return $response;
804  }
805 
811  protected function ‪getCurrentWorkspace()
812  {
813  return $this->workspaceService->getCurrentWorkspace();
814  }
815 
817  {
818  return ‪$GLOBALS['BE_USER'];
819  }
820 
822  {
823  return ‪$GLOBALS['LANG'];
824  }
825 }
‪TYPO3\CMS\Core\DataHandling\DataHandler
Definition: DataHandler.php:94
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getRecipientsOfStage
‪array getRecipientsOfStage($stageRecord)
Definition: ActionHandler.php:647
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sendToSpecificStageWindow
‪array sendToSpecificStageWindow($nextStageId, array $elements)
Definition: ActionHandler.php:282
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\viewSingleRecord
‪string viewSingleRecord($table, $uid)
Definition: ActionHandler.php:108
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sendToPrevStageWindow
‪array sendToPrevStageWindow($uid, $table)
Definition: ActionHandler.php:241
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getPublishCommands
‪array getPublishCommands(array $selection)
Definition: ActionHandler.php:146
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sentCollectionToStage
‪array sentCollectionToStage(\stdClass $parameters)
Definition: ActionHandler.php:417
‪TYPO3\CMS\Backend\View\BackendViewFactory
Definition: BackendViewFactory.php:35
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getSentToStageWindow
‪array getSentToStageWindow($nextStage)
Definition: ActionHandler.php:618
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\publishSingleRecord
‪publishSingleRecord($table, $t3ver_oid, $orig_uid)
Definition: ActionHandler.php:75
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sendPageToNextStage
‪array sendPageToNextStage($id)
Definition: ActionHandler.php:729
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\saveColumnModel
‪saveColumnModel($model)
Definition: ActionHandler.php:180
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getFlushCommands
‪array getFlushCommands(array $selection)
Definition: ActionHandler.php:164
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getErrorResponse
‪array getErrorResponse($errorLabel, $errorCode=0, $successFlagValue=false)
Definition: ActionHandler.php:793
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sendPageToPreviousStage
‪array sendPageToPreviousStage($id)
Definition: ActionHandler.php:697
‪TYPO3\CMS\Workspaces\Domain\Record\WorkspaceRecord
Definition: WorkspaceRecord.php:31
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sendToNextStageExecute
‪array sendToNextStageExecute(\stdClass $parameters)
Definition: ActionHandler.php:494
‪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:382
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sendToNextStageWindow
‪array sendToNextStageWindow($uid, $table, $t3ver_oid)
Definition: ActionHandler.php:209
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\generateWorkspacePreviewLink
‪string generateWorkspacePreviewLink($uid)
Definition: ActionHandler.php:51
‪TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger
‪static bool canBeInterpretedAsInteger(mixed $var)
Definition: MathUtility.php:69
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getDefaultCommentOfStage
‪string getDefaultCommentOfStage($stage)
Definition: ActionHandler.php:685
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getCurrentWorkspace
‪int getCurrentWorkspace()
Definition: ActionHandler.php:811
‪TYPO3\CMS\Workspaces\Domain\Record\WorkspaceRecord\get
‪static get(int $uid, array $record=null)
Definition: WorkspaceRecord.php:61
‪TYPO3\CMS\Workspaces\Domain\Record\StageRecord
Definition: StageRecord.php:28
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\processTcaCmd
‪array processTcaCmd(array $cmdMapArray)
Definition: ActionHandler.php:459
‪TYPO3\CMS\Workspaces\Preview\PreviewUriBuilder
Definition: PreviewUriBuilder.php:47
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\updateStageChangeButtons
‪updateStageChangeButtons(int $id, ServerRequestInterface $request)
Definition: ActionHandler.php:760
‪TYPO3\CMS\Webhooks\Message\$record
‪identifier readonly int readonly array $record
Definition: PageModificationMessage.php:36
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getLanguageService
‪getLanguageService()
Definition: ActionHandler.php:821
‪TYPO3\CMS\Workspaces\Controller\Remote
Definition: ActionHandler.php:18
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
Definition: BackendUserAuthentication.php:62
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sendToSpecificStageExecute
‪array sendToSpecificStageExecute(\stdClass $parameters)
Definition: ActionHandler.php:579
‪TYPO3\CMS\Workspaces\Service\WorkspaceService
Definition: WorkspaceService.php:38
‪TYPO3\CMS\Workspaces\Service\StagesService
Definition: StagesService.php:33
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sendToPrevStageExecute
‪array sendToPrevStageExecute(\stdClass $parameters)
Definition: ActionHandler.php:537
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\loadColumnModel
‪loadColumnModel()
Definition: ActionHandler.php:193
‪TYPO3\CMS\Webhooks\Message\$uid
‪identifier readonly int $uid
Definition: PageModificationMessage.php:35
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler
Definition: ActionHandler.php:38
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getRecipientList
‪array getRecipientList(array $uidOfRecipients, $additionalRecipients, $stageId)
Definition: ActionHandler.php:307
‪TYPO3\CMS\Core\Utility\MathUtility
Definition: MathUtility.php:24
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getBackendUser
‪getBackendUser()
Definition: ActionHandler.php:816
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\generateWorkspacePreviewLinksForAllLanguages
‪array generateWorkspacePreviewLinksForAllLanguages($uid)
Definition: ActionHandler.php:62
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:46
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\executeSelectionAction
‪array executeSelectionAction($parameter)
Definition: ActionHandler.php:119
‪TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\__construct
‪__construct(protected readonly StagesService $stagesService, protected readonly WorkspaceService $workspaceService, protected readonly BackendViewFactory $backendViewFactory,)
Definition: ActionHandler.php:39
‪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\Controller\Remote\ActionHandler\deleteSingleRecord
‪deleteSingleRecord($table, $uid)
Definition: ActionHandler.php:92