‪TYPO3CMS  11.5
StagesService.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 
18 use TYPO3\CMS\Backend\Utility\BackendUtility;
27 
32 {
33  public const ‪TABLE_STAGE = 'sys_workspace_stage';
34  // if a record is in the "ready to publish" stage STAGE_PUBLISH_ID the nextStage is STAGE_PUBLISH_EXECUTE_ID, this id wont be saved at any time in db
35  public const ‪STAGE_PUBLISH_EXECUTE_ID = -20;
36  // ready to publish stage
37  public const ‪STAGE_PUBLISH_ID = -10;
38  public const ‪STAGE_EDIT_ID = 0;
39 
45  private ‪$pathToLocallang = 'LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf';
46 
48 
54  protected ‪$workspaceStageCache = [];
55 
59  protected ‪$workspaceStageAllowedCache = [];
60 
66  public function ‪getWorkspaceId()
67  {
68  return $this->‪getBackendUser()->workspace;
69  }
70 
79  $workspaceItems,
80  array $byTableName = ['tt_content', 'pages']
81  ) {
82  $currentStage = [];
83  $previousStage = [];
84  $usedStages = [];
85  $found = false;
86  $availableStagesForWS = array_reverse($this->‪getStagesForWS());
87  $availableStagesForWSUser = $this->‪getStagesForWSUser();
88  $byTableName = array_flip($byTableName);
89  foreach ($workspaceItems as $tableName => $items) {
90  if (!array_key_exists($tableName, $byTableName)) {
91  continue;
92  }
93  foreach ($items as $item) {
94  $usedStages[$item['t3ver_stage'] ?? 0] = true;
95  }
96  }
97  foreach ($availableStagesForWS as $stage) {
98  if (isset($usedStages[$stage['uid']])) {
99  $currentStage = $stage;
100  $previousStage = $this->‪getPrevStage($stage['uid']);
101  break;
102  }
103  }
104  foreach ($availableStagesForWSUser as $userWS) {
105  if ($previousStage && $previousStage['uid'] == $userWS['uid']) {
106  $found = true;
107  break;
108  }
109  }
110  if ($found === false || !$this->‪isStageAllowedForUser($currentStage['uid'])) {
111  $previousStage = [];
112  }
113  return [
114  $currentStage,
115  $previousStage,
116  ];
117  }
118 
126  public function ‪getNextStageForElementCollection(
127  $workspaceItems,
128  array $byTableName = ['tt_content', 'pages']
129  ) {
130  $currentStage = [];
131  $usedStages = [];
132  $nextStage = [];
133  $availableStagesForWS = $this->‪getStagesForWS();
134  $availableStagesForWSUser = $this->‪getStagesForWSUser();
135  $byTableName = array_flip($byTableName);
136  $found = false;
137  foreach ($workspaceItems as $tableName => $items) {
138  if (!array_key_exists($tableName, $byTableName)) {
139  continue;
140  }
141  foreach ($items as $item) {
142  $usedStages[$item['t3ver_stage'] ?? 0] = true;
143  }
144  }
145  foreach ($availableStagesForWS as $stage) {
146  if (isset($usedStages[$stage['uid']])) {
147  $currentStage = $stage;
148  $nextStage = $this->‪getNextStage($stage['uid']);
149  break;
150  }
151  }
152  foreach ($availableStagesForWSUser as $userWS) {
153  if ($nextStage && $nextStage['uid'] == $userWS['uid']) {
154  $found = true;
155  break;
156  }
157  }
158  if ($found === false || !$this->‪isStageAllowedForUser($currentStage['uid'])) {
159  $nextStage = [];
160  }
161  return [
162  $currentStage,
163  $nextStage,
164  ];
165  }
166 
172  public function ‪getStagesForWS()
173  {
174  if (isset($this->workspaceStageCache[$this->‪getWorkspaceId()])) {
175  $stages = $this->workspaceStageCache[$this->‪getWorkspaceId()];
176  } elseif ($this->‪getWorkspaceId() === 0) {
177  $stages = [];
178  } else {
179  $stages = $this->‪prepareStagesArray($this->‪getWorkspaceRecord()->getStages());
180  $this->workspaceStageCache[$this->‪getWorkspaceId()] = $stages;
181  }
182  return $stages;
183  }
184 
190  public function ‪getStagesForWSUser()
191  {
192  if ($this->‪getBackendUser()->isAdmin()) {
193  return $this->‪getStagesForWS();
194  }
195  // The LIVE workspace has no stages
196  if ($this->‪getWorkspaceId() === 0) {
197  return [];
198  }
199 
201  $allowedStages = [];
202  $stageRecords = $this->‪getWorkspaceRecord()->‪getStages();
203 
204  // Only use stages that are allowed for current backend user
205  foreach ($stageRecords as $stageRecord) {
206  if ($stageRecord->isAllowed()) {
207  $allowedStages[$stageRecord->getUid()] = $stageRecord;
208  }
209  }
210 
211  // Add previous and next stages (even if they are not allowed!)
212  foreach ($allowedStages as $allowedStage) {
213  $previousStage = $allowedStage->‪getPrevious();
214  $nextStage = $allowedStage->‪getNext();
215  if ($previousStage !== null && !isset($allowedStages[$previousStage->getUid()])) {
216  $allowedStages[$previousStage->getUid()] = $previousStage;
217  }
218  if ($nextStage !== null && !isset($allowedStages[$nextStage->getUid()])) {
219  $allowedStages[$nextStage->getUid()] = $nextStage;
220  }
221  }
222 
223  uasort($allowedStages, static function (StageRecord $first, StageRecord $second) {
224  return $first->determineOrder($second);
225  });
226  return $this->‪prepareStagesArray($allowedStages);
227  }
228 
235  protected function ‪prepareStagesArray(array $stageRecords)
236  {
237  $stagesArray = [];
238  foreach ($stageRecords as $stageRecord) {
239  $stage = [
240  'uid' => $stageRecord->getUid(),
241  'label' => $stageRecord->getTitle(),
242  ];
243  if (!$stageRecord->isExecuteStage()) {
244  $stage['title'] = $this->‪getLanguageService()->‪sL($this->pathToLocallang . ':actionSendToStage') . ' "' . $stageRecord->getTitle() . '"';
245  } else {
246  $stage['title'] = $this->‪getLanguageService()->‪sL($this->pathToLocallang . ':publish_execute_action_option');
247  }
248  $stagesArray[] = $stage;
249  }
250  return $stagesArray;
251  }
252 
259  public function ‪getStageTitle($ver_stage)
260  {
261  switch ($ver_stage) {
263  $stageTitle = $this->‪getLanguageService()->‪sL('LLL:EXT:workspaces/Resources/Private/Language/locallang_mod_user_ws.xlf:stage_publish');
264  break;
266  $stageTitle = $this->‪getLanguageService()->‪sL('LLL:EXT:workspaces/Resources/Private/Language/locallang_mod.xlf:stage_ready_to_publish');
267  break;
269  $stageTitle = $this->‪getLanguageService()->‪sL('LLL:EXT:workspaces/Resources/Private/Language/locallang_mod_user_ws.xlf:stage_editing');
270  break;
271  default:
272  $stageTitle = $this->‪getPropertyOfCurrentWorkspaceStage($ver_stage, 'title');
273  if ($stageTitle == null) {
274  $stageTitle = $this->‪getLanguageService()->‪sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf:error.getStageTitle.stageNotFound');
275  }
276  }
277  return $stageTitle;
278  }
279 
286  public function ‪getStageRecord($stageid)
287  {
288  return BackendUtility::getRecord('sys_workspace_stage', $stageid);
289  }
290 
298  public function ‪getNextStage($stageId)
299  {
301  throw new \InvalidArgumentException(
302  $this->‪getLanguageService()->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf:error.stageId.integer'),
303  1291109987
304  );
305  }
306  $nextStage = false;
307  $workspaceStageRecs = $this->‪getStagesForWS();
308  if (is_array($workspaceStageRecs) && !empty($workspaceStageRecs)) {
309  reset($workspaceStageRecs);
310  while (key($workspaceStageRecs) !== null) {
311  $workspaceStageRec = current($workspaceStageRecs);
312  if ($workspaceStageRec['uid'] == $stageId) {
313  $nextStage = next($workspaceStageRecs);
314  break;
315  }
316  next($workspaceStageRecs);
317  }
318  }
319  if ($nextStage === false) {
320  $nextStage = [
321  [
322  'uid' => ‪self::STAGE_EDIT_ID,
323  'title' => $this->‪getLanguageService()->‪sL($this->pathToLocallang . ':actionSendToStage') . ' "'
324  . $this->‪getLanguageService()->‪sL('LLL:EXT:workspaces/Resources/Private/Language/locallang_mod_user_ws.xlf:stage_editing') . '"',
325  ],
326  ];
327  }
328  return $nextStage;
329  }
330 
338  public function ‪getNextStages(array &$nextStageArray, $stageId)
339  {
340  // Current stage is "Ready to publish" - there is no next stage
341  if ($stageId == self::STAGE_PUBLISH_ID) {
342  return $nextStageArray;
343  }
344  $nextStageRecord = $this->‪getNextStage($stageId);
345  if (empty($nextStageRecord) || !is_array($nextStageRecord)) {
346  // There is no next stage
347  return $nextStageArray;
348  }
349  // Check if the user has the permission to for the current stage
350  // If this next stage record is the first next stage after the current the user
351  // has always the needed permission
352  if ($this->‪isStageAllowedForUser($stageId)) {
353  $nextStageArray[] = $nextStageRecord;
354  return $this->‪getNextStages($nextStageArray, $nextStageRecord['uid']);
355  }
356  // He hasn't - return given next stage array
357  return $nextStageArray;
358  }
359 
367  public function ‪getPrevStage($stageId)
368  {
370  throw new \InvalidArgumentException(
371  $this->‪getLanguageService()->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf:error.stageId.integer'),
372  1476048351
373  );
374  }
375  $prevStage = false;
376  $workspaceStageRecs = $this->‪getStagesForWS();
377  if (is_array($workspaceStageRecs) && !empty($workspaceStageRecs)) {
378  end($workspaceStageRecs);
379  while (key($workspaceStageRecs) !== null) {
380  $workspaceStageRec = current($workspaceStageRecs);
381  if ($workspaceStageRec['uid'] == $stageId) {
382  $prevStage = prev($workspaceStageRecs);
383  break;
384  }
385  prev($workspaceStageRecs);
386  }
387  }
388 
389  return $prevStage;
390  }
391 
399  public function ‪getPrevStages(array &$prevStageArray, $stageId)
400  {
401  // Current stage is "Editing" - there is no prev stage
402  if ($stageId != self::STAGE_EDIT_ID) {
403  $prevStageRecord = $this->‪getPrevStage($stageId);
404  if (!empty($prevStageRecord) && is_array($prevStageRecord)) {
405  // Check if the user has the permission to switch to that stage
406  // If this prev stage record is the first previous stage before the current
407  // the user has always the needed permission
408  if ($this->‪isStageAllowedForUser($stageId)) {
409  $prevStageArray[] = $prevStageRecord;
410  $prevStageArray = $this->‪getPrevStages($prevStageArray, $prevStageRecord['uid']);
411  }
412  }
413  }
414  return $prevStageArray;
415  }
416 
425  public function ‪getResponsibleBeUser($stageRecord, $selectDefaultUserField = false)
426  {
427  if (!$stageRecord instanceof StageRecord) {
428  $stageRecord = $this->‪getWorkspaceRecord()->‪getStage($stageRecord);
429  }
430 
431  $recipientArray = [];
432 
433  if (!$selectDefaultUserField) {
434  $backendUserIds = $stageRecord->‪getAllRecipients();
435  } else {
436  $backendUserIds = $stageRecord->getDefaultRecipients();
437  }
438 
439  $userList = implode(',', $backendUserIds);
440  $userRecords = $this->‪getBackendUsers($userList);
441  foreach ($userRecords as $userUid => $userRecord) {
442  $recipientArray[$userUid] = $userRecord;
443  }
444  return $recipientArray;
445  }
446 
454  public function ‪resolveBackendUserIds($backendUserGroupList)
455  {
456  $elements = ‪GeneralUtility::trimExplode(',', $backendUserGroupList, true);
457  $backendUserIds = [];
458  $backendGroupIds = [];
459 
460  foreach ($elements as $element) {
461  if (strpos($element, 'be_users_') === 0) {
462  // Current value is a uid of a be_user record
463  $backendUserIds[] = str_replace('be_users_', '', $element);
464  } elseif (strpos($element, 'be_groups_') === 0) {
465  $backendGroupIds[] = (int)str_replace('be_groups_', '', $element);
466  } elseif ((int)$element) {
467  $backendUserIds[] = (int)$element;
468  }
469  }
470 
471  if (!empty($backendGroupIds)) {
472  $groupResolver = GeneralUtility::makeInstance(GroupResolver::class);
473  $backendUsersInGroups = $groupResolver->findAllUsersInGroups($backendGroupIds, 'be_groups', 'be_users');
474  foreach ($backendUsersInGroups as $backendUsers) {
475  $backendUserIds[] = (int)$backendUsers['uid'];
476  }
477  }
478 
479  return array_unique($backendUserIds);
480  }
481 
488  public function ‪getBackendUsers($backendUserList)
489  {
490  if (empty($backendUserList)) {
491  return [];
492  }
493 
494  $backendUserList = implode(',', ‪GeneralUtility::intExplode(',', $backendUserList));
495  $backendUsers = BackendUtility::getUserNames(
496  'username, uid, email, realName, lang, uc',
497  'AND uid IN (' . $backendUserList . ')' . BackendUtility::BEenableFields('be_users')
498  );
499 
500  if (empty($backendUsers)) {
501  $backendUsers = [];
502  }
503  return $backendUsers;
504  }
505 
510  public function ‪getPreselectedRecipients(StageRecord $stageRecord)
511  {
512  if ($stageRecord->areEditorsPreselected()) {
513  return array_merge(
514  $stageRecord->getPreselectedRecipients(),
515  $this->getRecordService()->getCreateUserIds()
516  );
517  }
518  return $stageRecord->getPreselectedRecipients();
519  }
520 
524  protected function ‪getWorkspaceRecord()
525  {
527  }
528 
537  public function ‪getPropertyOfCurrentWorkspaceStage($stageId, $property)
538  {
539  $result = null;
541  throw new \InvalidArgumentException(
542  $this->‪getLanguageService()->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf:error.stageId.integer'),
543  1476048371
544  );
545  }
546  $workspaceStage = BackendUtility::getRecord(self::TABLE_STAGE, $stageId);
547  if (is_array($workspaceStage) && isset($workspaceStage[$property])) {
548  $result = $workspaceStage[$property];
549  }
550  return $result;
551  }
552 
560  public function ‪getPositionOfCurrentStage($stageId)
561  {
562  $stagesOfWS = $this->‪getStagesForWS();
563  $countOfStages = count($stagesOfWS);
564  switch ($stageId) {
566  $position = $countOfStages;
567  break;
569  $position = 1;
570  break;
571  default:
572  $position = 1;
573  foreach ($stagesOfWS as $key => $stageInfoArray) {
574  $position++;
575  if ($stageId == $stageInfoArray['uid']) {
576  break;
577  }
578  }
579  }
580  return ['position' => $position, 'count' => $countOfStages];
581  }
582 
589  public function ‪isPrevStageAllowedForUser($stageId)
590  {
591  $isAllowed = false;
592  try {
593  $prevStage = $this->‪getPrevStage($stageId);
594  // if there's no prev-stage the stageIds match,
595  // otherwise we've to check if the user is permitted to use the stage
596  if (!empty($prevStage) && $prevStage['uid'] != $stageId) {
597  // if the current stage is allowed for the user, the user is also allowed to send to prev
598  $isAllowed = $this->‪isStageAllowedForUser($stageId);
599  }
600  } catch (\Exception $e) {
601  }
602  return $isAllowed;
603  }
604 
611  public function ‪isNextStageAllowedForUser($stageId)
612  {
613  $isAllowed = false;
614  try {
615  $nextStage = $this->‪getNextStage($stageId);
616  // if there's no next-stage the stageIds match,
617  // otherwise we've to check if the user is permitted to use the stage
618  if (!empty($nextStage) && $nextStage['uid'] != $stageId) {
619  // if the current stage is allowed for the user, the user is also allowed to send to next
620  $isAllowed = $this->‪isStageAllowedForUser($stageId);
621  }
622  } catch (\Exception $e) {
623  }
624  return $isAllowed;
625  }
626 
631  protected function ‪isStageAllowedForUser($stageId)
632  {
633  $cacheKey = $this->‪getWorkspaceId() . '_' . $stageId;
634  if (isset($this->workspaceStageAllowedCache[$cacheKey])) {
635  return $this->workspaceStageAllowedCache[$cacheKey];
636  }
637  $isAllowed = $this->‪getBackendUser()->‪workspaceCheckStageForCurrent($stageId);
638  $this->workspaceStageAllowedCache[$cacheKey] = $isAllowed;
639  return $isAllowed;
640  }
641 
648  public function ‪isValid($stageId)
649  {
650  $isValid = false;
651  $stages = $this->‪getStagesForWS();
652  foreach ($stages as $stage) {
653  if ($stage['uid'] == $stageId) {
654  $isValid = true;
655  break;
656  }
657  }
658  return $isValid;
659  }
660 
664  public function ‪getRecordService()
665  {
666  if (!isset($this->recordService)) {
667  $this->recordService = GeneralUtility::makeInstance(RecordService::class);
668  }
670  }
671 
675  protected function ‪getBackendUser()
676  {
677  return ‪$GLOBALS['BE_USER'];
678  }
679 
683  protected function ‪getLanguageService(): ?LanguageService
684  {
685  return ‪$GLOBALS['LANG'] ?? null;
686  }
687 }
‪TYPO3\CMS\Workspaces\Service\StagesService\getWorkspaceId
‪int getWorkspaceId()
Definition: StagesService.php:63
‪TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode
‪static list< string > trimExplode($delim, $string, $removeEmptyValues=false, $limit=0)
Definition: GeneralUtility.php:999
‪TYPO3\CMS\Workspaces\Domain\Record\StageRecord\areEditorsPreselected
‪bool areEditorsPreselected()
Definition: StageRecord.php:251
‪TYPO3\CMS\Workspaces\Service\StagesService\isPrevStageAllowedForUser
‪bool isPrevStageAllowedForUser($stageId)
Definition: StagesService.php:586
‪TYPO3\CMS\Workspaces\Domain\Record\StageRecord\determineOrder
‪int determineOrder(StageRecord $stageRecord)
Definition: StageRecord.php:114
‪TYPO3\CMS\Workspaces\Service\StagesService\getPropertyOfCurrentWorkspaceStage
‪string getPropertyOfCurrentWorkspaceStage($stageId, $property)
Definition: StagesService.php:534
‪TYPO3\CMS\Workspaces\Domain\Record\StageRecord\getAllRecipients
‪array getAllRecipients()
Definition: StageRecord.php:316
‪TYPO3\CMS\Workspaces\Service\StagesService\getNextStage
‪array getNextStage($stageId)
Definition: StagesService.php:295
‪TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger
‪static bool canBeInterpretedAsInteger($var)
Definition: MathUtility.php:74
‪TYPO3\CMS\Workspaces\Service\StagesService\getBackendUsers
‪array getBackendUsers($backendUserList)
Definition: StagesService.php:485
‪TYPO3\CMS\Workspaces\Service\StagesService\isStageAllowedForUser
‪bool isStageAllowedForUser($stageId)
Definition: StagesService.php:628
‪TYPO3\CMS\Workspaces\Service\StagesService\$workspaceStageAllowedCache
‪array $workspaceStageAllowedCache
Definition: StagesService.php:56
‪TYPO3\CMS\Workspaces\Service
‪TYPO3\CMS\Workspaces\Service\StagesService\getResponsibleBeUser
‪array getResponsibleBeUser($stageRecord, $selectDefaultUserField=false)
Definition: StagesService.php:422
‪TYPO3\CMS\Workspaces\Service\StagesService\getNextStageForElementCollection
‪array getNextStageForElementCollection( $workspaceItems, array $byTableName=['tt_content', 'pages'])
Definition: StagesService.php:123
‪TYPO3\CMS\Workspaces\Service\StagesService\getNextStages
‪array getNextStages(array &$nextStageArray, $stageId)
Definition: StagesService.php:335
‪TYPO3\CMS\Workspaces\Service\StagesService\getStageTitle
‪string getStageTitle($ver_stage)
Definition: StagesService.php:256
‪TYPO3\CMS\Workspaces\Service\StagesService\getPositionOfCurrentStage
‪array getPositionOfCurrentStage($stageId)
Definition: StagesService.php:557
‪TYPO3\CMS\Workspaces\Domain\Record\WorkspaceRecord
Definition: WorkspaceRecord.php:27
‪TYPO3\CMS\Core\Localization\LanguageService\sL
‪string sL($input)
Definition: LanguageService.php:161
‪TYPO3\CMS\Workspaces\Service\StagesService\STAGE_PUBLISH_EXECUTE_ID
‪const STAGE_PUBLISH_EXECUTE_ID
Definition: StagesService.php:35
‪TYPO3\CMS\Workspaces\Service\StagesService\getPreselectedRecipients
‪array getPreselectedRecipients(StageRecord $stageRecord)
Definition: StagesService.php:507
‪TYPO3\CMS\Workspaces\Service\StagesService\isValid
‪bool isValid($stageId)
Definition: StagesService.php:645
‪TYPO3\CMS\Workspaces\Domain\Record\StageRecord\getPreselectedRecipients
‪int[] getPreselectedRecipients()
Definition: StageRecord.php:340
‪TYPO3\CMS\Workspaces\Service\StagesService\STAGE_PUBLISH_ID
‪const STAGE_PUBLISH_ID
Definition: StagesService.php:37
‪TYPO3\CMS\Workspaces\Service\StagesService\getWorkspaceRecord
‪WorkspaceRecord getWorkspaceRecord()
Definition: StagesService.php:521
‪TYPO3\CMS\Workspaces\Service\StagesService\getStagesForWSUser
‪array getStagesForWSUser()
Definition: StagesService.php:187
‪TYPO3\CMS\Workspaces\Domain\Record\StageRecord
Definition: StageRecord.php:24
‪TYPO3\CMS\Workspaces\Service\StagesService\isNextStageAllowedForUser
‪bool isNextStageAllowedForUser($stageId)
Definition: StagesService.php:608
‪TYPO3\CMS\Workspaces\Service\StagesService\getStagesForWS
‪array getStagesForWS()
Definition: StagesService.php:169
‪TYPO3\CMS\Workspaces\Service\StagesService\getBackendUser
‪BackendUserAuthentication getBackendUser()
Definition: StagesService.php:672
‪TYPO3\CMS\Workspaces\Service\StagesService\getStageRecord
‪array null getStageRecord($stageid)
Definition: StagesService.php:283
‪TYPO3\CMS\Workspaces\Service\StagesService\getPrevStage
‪bool array getPrevStage($stageId)
Definition: StagesService.php:364
‪TYPO3\CMS\Workspaces\Service\StagesService\$recordService
‪RecordService $recordService
Definition: StagesService.php:46
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
Definition: BackendUserAuthentication.php:62
‪TYPO3\CMS\Workspaces\Service\StagesService\$pathToLocallang
‪string $pathToLocallang
Definition: StagesService.php:44
‪TYPO3\CMS\Workspaces\Service\StagesService\getRecordService
‪RecordService getRecordService()
Definition: StagesService.php:661
‪TYPO3\CMS\Core\Authentication\GroupResolver
Definition: GroupResolver.php:36
‪TYPO3\CMS\Workspaces\Service\StagesService\STAGE_EDIT_ID
‪const STAGE_EDIT_ID
Definition: StagesService.php:38
‪TYPO3\CMS\Workspaces\Service\StagesService
Definition: StagesService.php:32
‪TYPO3\CMS\Workspaces\Domain\Record\StageRecord\getNext
‪StageRecord null getNext()
Definition: StageRecord.php:105
‪TYPO3\CMS\Workspaces\Service\StagesService\$workspaceStageCache
‪array $workspaceStageCache
Definition: StagesService.php:52
‪TYPO3\CMS\Workspaces\Service\StagesService\prepareStagesArray
‪array prepareStagesArray(array $stageRecords)
Definition: StagesService.php:232
‪TYPO3\CMS\Workspaces\Domain\Record\WorkspaceRecord\getStages
‪StageRecord[] getStages()
Definition: WorkspaceRecord.php:106
‪TYPO3\CMS\Core\SingletonInterface
Definition: SingletonInterface.php:22
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Core\Utility\GeneralUtility\intExplode
‪static int[] intExplode($delimiter, $string, $removeEmptyValues=false, $limit=0)
Definition: GeneralUtility.php:927
‪TYPO3\CMS\Core\Utility\MathUtility
Definition: MathUtility.php:22
‪TYPO3\CMS\Workspaces\Domain\Record\WorkspaceRecord\get
‪static WorkspaceRecord get($uid, ?array $record=null)
Definition: WorkspaceRecord.php:70
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:42
‪TYPO3\CMS\Workspaces\Service\StagesService\getPrevStages
‪array getPrevStages(array &$prevStageArray, $stageId)
Definition: StagesService.php:396
‪TYPO3\CMS\Workspaces\Service\StagesService\resolveBackendUserIds
‪array resolveBackendUserIds($backendUserGroupList)
Definition: StagesService.php:451
‪TYPO3\CMS\Workspaces\Service\StagesService\getPreviousStageForElementCollection
‪array getPreviousStageForElementCollection( $workspaceItems, array $byTableName=['tt_content', 'pages'])
Definition: StagesService.php:75
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:50
‪TYPO3\CMS\Workspaces\Service\StagesService\TABLE_STAGE
‪const TABLE_STAGE
Definition: StagesService.php:33
‪TYPO3\CMS\Workspaces\Domain\Record\StageRecord\getPrevious
‪StageRecord null getPrevious()
Definition: StageRecord.php:97
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceCheckStageForCurrent
‪bool workspaceCheckStageForCurrent($stage)
Definition: BackendUserAuthentication.php:899
‪TYPO3\CMS\Workspaces\Service\RecordService
Definition: RecordService.php:28
‪TYPO3\CMS\Workspaces\Service\StagesService\getLanguageService
‪LanguageService null getLanguageService()
Definition: StagesService.php:680
‪TYPO3\CMS\Workspaces\Domain\Record\WorkspaceRecord\getStage
‪StageRecord null getStage($stageId)
Definition: WorkspaceRecord.php:146