‪TYPO3CMS  9.5
GridDataService.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
17 use Psr\Log\LoggerAwareInterface;
18 use Psr\Log\LoggerAwareTrait;
30 
34 class ‪GridDataService implements LoggerAwareInterface
35 {
36  use LoggerAwareTrait;
37 
38  const ‪SIGNAL_GenerateDataArray_BeforeCaching = 'generateDataArray.beforeCaching';
39  const ‪SIGNAL_GenerateDataArray_PostProcesss = 'generateDataArray.postProcess';
40  const ‪SIGNAL_GetDataArray_PostProcesss = 'getDataArray.postProcess';
41  const ‪SIGNAL_SortDataArray_PostProcesss = 'sortDataArray.postProcess';
42 
43  const ‪GridColumn_Collection = 'Workspaces_Collection';
44  const ‪GridColumn_CollectionLevel = 'Workspaces_CollectionLevel';
45  const ‪GridColumn_CollectionParent = 'Workspaces_CollectionParent';
46  const ‪GridColumn_CollectionCurrent = 'Workspaces_CollectionCurrent';
47  const ‪GridColumn_CollectionChildren = 'Workspaces_CollectionChildren';
48 
54  protected ‪$currentWorkspace;
55 
61  protected ‪$dataArray = [];
62 
68  protected ‪$sort = '';
69 
75  protected ‪$sortDir = '';
76 
80  protected ‪$workspacesCache;
81 
85  protected ‪$integrityService;
86 
96  public function ‪generateGridListFromVersions($versions, $parameter, ‪$currentWorkspace)
97  {
98  // Read the given parameters from grid. If the parameter is not set use default values.
99  $filterTxt = $parameter->filterTxt ?? '';
100  $start = isset($parameter->start) ? (int)$parameter->start : 0;
101  $limit = isset($parameter->limit) ? (int)$parameter->limit : 30;
102  $this->sort = $parameter->sort ?? 't3ver_oid';
103  $this->sortDir = $parameter->dir ?? 'ASC';
104  if (is_int(‪$currentWorkspace)) {
105  $this->currentWorkspace = ‪$currentWorkspace;
106  } else {
107  throw new \InvalidArgumentException('No such workspace defined', 1476048304);
108  }
109  $data = [];
110  $data['data'] = [];
111  $this->‪generateDataArray($versions, $filterTxt);
112  $data['total'] = count($this->dataArray);
113  $data['data'] = $this->‪getDataArray($start, $limit);
114  return $data;
115  }
116 
123  protected function ‪generateDataArray(array $versions, $filterTxt)
124  {
125  $workspaceAccess = ‪$GLOBALS['BE_USER']->checkWorkspace(‪$GLOBALS['BE_USER']->workspace);
126  $swapStage = $workspaceAccess['publish_access'] & 1 ? ‪StagesService::STAGE_PUBLISH_ID : 0;
127  $swapAccess = ‪$GLOBALS['BE_USER']->workspacePublishAccess(‪$GLOBALS['BE_USER']->workspace) && ‪$GLOBALS['BE_USER']->workspaceSwapAccess();
129  $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
130  // check for dataArray in cache
131  if ($this->‪getDataArrayFromCache($versions, $filterTxt) === false) {
132  $stagesObj = GeneralUtility::makeInstance(StagesService::class);
133  $defaultGridColumns = [
134  self::GridColumn_Collection => 0,
135  self::GridColumn_CollectionLevel => 0,
136  self::GridColumn_CollectionParent => '',
137  self::GridColumn_CollectionCurrent => '',
138  self::GridColumn_CollectionChildren => 0,
139  ];
140  foreach ($versions as $table => $records) {
141  $hiddenField = $this->‪getTcaEnableColumnsFieldName($table, 'disabled');
142  $isRecordTypeAllowedToModify = ‪$GLOBALS['BE_USER']->check('tables_modify', $table);
143 
144  foreach ($records as $record) {
145  $origRecord = ‪BackendUtility::getRecord($table, $record['t3ver_oid']);
146  $versionRecord = ‪BackendUtility::getRecord($table, $record['uid']);
147  $combinedRecord = ‪CombinedRecord::createFromArrays($table, $origRecord, $versionRecord);
148  $this->‪getIntegrityService()->‪checkElement($combinedRecord);
149 
150  if ($hiddenField !== null) {
151  $recordState = $this->‪workspaceState($versionRecord['t3ver_state'], $origRecord[$hiddenField], $versionRecord[$hiddenField]);
152  } else {
153  $recordState = $this->‪workspaceState($versionRecord['t3ver_state']);
154  }
155 
156  $isDeletedPage = $table === 'pages' && $recordState === 'deleted';
157  $pageId = $table === 'pages' ? $record['uid'] : $record['pid'];
158  $viewUrl = GeneralUtility::makeInstance(PreviewUriBuilder::class)->buildUriForElement($table, $record['uid'], $origRecord, $versionRecord);
159  $versionArray = [];
160  $versionArray['table'] = $table;
161  $versionArray['id'] = $table . ':' . $record['uid'];
162  $versionArray['uid'] = $record['uid'];
163  $versionArray['workspace'] = $versionRecord['t3ver_id'];
164  $versionArray = array_merge($versionArray, $defaultGridColumns);
165  $versionArray['label_Workspace'] = htmlspecialchars(‪BackendUtility::getRecordTitle($table, $versionRecord));
166  $versionArray['label_Live'] = htmlspecialchars(‪BackendUtility::getRecordTitle($table, $origRecord));
167  $versionArray['label_Stage'] = htmlspecialchars($stagesObj->getStageTitle($versionRecord['t3ver_stage']));
168  $tempStage = $stagesObj->getNextStage($versionRecord['t3ver_stage']);
169  $versionArray['label_nextStage'] = htmlspecialchars($stagesObj->getStageTitle($tempStage['uid']));
170  $versionArray['value_nextStage'] = (int)$tempStage['uid'];
171  $tempStage = $stagesObj->getPrevStage($versionRecord['t3ver_stage']);
172  $versionArray['label_prevStage'] = htmlspecialchars($stagesObj->getStageTitle($tempStage['uid']));
173  $versionArray['value_prevStage'] = (int)$tempStage['uid'];
174  $versionArray['path_Live'] = htmlspecialchars(‪BackendUtility::getRecordPath($record['livepid'], '', 999));
175  // no htmlspecialchars necessary as this is only used in JS via text function
176  $versionArray['path_Workspace'] = ‪BackendUtility::getRecordPath($record['wspid'], '', 999);
177  $versionArray['workspace_Title'] = htmlspecialchars(‪WorkspaceService::getWorkspaceTitle($versionRecord['t3ver_wsid']));
178  $versionArray['workspace_Tstamp'] = $versionRecord['tstamp'];
179  $versionArray['workspace_Formated_Tstamp'] = ‪BackendUtility::datetime($versionRecord['tstamp']);
180  $versionArray['t3ver_wsid'] = $versionRecord['t3ver_wsid'];
181  $versionArray['t3ver_oid'] = $record['t3ver_oid'];
182  $versionArray['livepid'] = $record['livepid'];
183  $versionArray['stage'] = $versionRecord['t3ver_stage'];
184  $versionArray['icon_Live'] = $iconFactory->getIconForRecord($table, $origRecord, ‪Icon::SIZE_SMALL)->render();
185  $versionArray['icon_Workspace'] = $iconFactory->getIconForRecord($table, $versionRecord, ‪Icon::SIZE_SMALL)->render();
186  $languageValue = $this->‪getLanguageValue($table, $versionRecord);
187  $versionArray['languageValue'] = $languageValue;
188  $versionArray['language'] = [
189  'icon' => $iconFactory->getIcon($this->‪getSystemLanguageValue($languageValue, $pageId, 'flagIcon'), ‪Icon::SIZE_SMALL)->render()
190  ];
191  $versionArray['allowedAction_nextStage'] = $isRecordTypeAllowedToModify && $stagesObj->isNextStageAllowedForUser($versionRecord['t3ver_stage']);
192  $versionArray['allowedAction_prevStage'] = $isRecordTypeAllowedToModify && $stagesObj->isPrevStageAllowedForUser($versionRecord['t3ver_stage']);
193  if ($swapAccess && $swapStage != 0 && $versionRecord['t3ver_stage'] == $swapStage) {
194  $versionArray['allowedAction_swap'] = $isRecordTypeAllowedToModify && $stagesObj->isNextStageAllowedForUser($swapStage);
195  } elseif ($swapAccess && $swapStage == 0) {
196  $versionArray['allowedAction_swap'] = $isRecordTypeAllowedToModify;
197  } else {
198  $versionArray['allowedAction_swap'] = false;
199  }
200  $versionArray['allowedAction_delete'] = $isRecordTypeAllowedToModify;
201  // preview and editing of a deleted page won't work ;)
202  $versionArray['allowedAction_view'] = !$isDeletedPage && $viewUrl;
203  $versionArray['allowedAction_edit'] = $isRecordTypeAllowedToModify && !$isDeletedPage;
204  $versionArray['allowedAction_editVersionedPage'] = $isRecordTypeAllowedToModify && !$isDeletedPage;
205  $versionArray['state_Workspace'] = $recordState;
206 
207  $versionArray = array_merge(
208  $versionArray,
209  $this->‪getAdditionalColumnService()->getData($combinedRecord)
210  );
211 
212  if ($filterTxt == '' || $this->‪isFilterTextInVisibleColumns($filterTxt, $versionArray)) {
213  $versionIdentifier = $versionArray['id'];
214  $this->dataArray[$versionIdentifier] = $versionArray;
215  }
216  }
217  }
218  // Suggested slot method:
219  // methodName(\TYPO3\CMS\Workspaces\Service\GridDataService $gridData, array $dataArray, array $versions)
220  list($this->dataArray, $versions) = $this->‪emitSignal(self::SIGNAL_GenerateDataArray_BeforeCaching, $this->dataArray, $versions);
221  // Enrich elements after everything has been processed:
222  foreach ($this->dataArray as &$element) {
223  $identifier = $element['table'] . ':' . $element['t3ver_oid'];
224  $element['integrity'] = [
225  'status' => $this->‪getIntegrityService()->‪getStatusRepresentation($identifier),
226  'messages' => htmlspecialchars($this->‪getIntegrityService()->getIssueMessages($identifier, true))
227  ];
228  }
229  $this->‪setDataArrayIntoCache($versions, $filterTxt);
230  }
231  // Suggested slot method:
232  // methodName(\TYPO3\CMS\Workspaces\Service\GridDataService $gridData, array $dataArray, array $versions)
233  list($this->dataArray, $versions) = $this->‪emitSignal(self::SIGNAL_GenerateDataArray_PostProcesss, $this->dataArray, $versions);
234  $this->‪sortDataArray();
236  }
237 
242  protected function ‪resolveDataArrayDependencies()
243  {
244  $collectionService = $this->‪getDependencyCollectionService();
245  $dependencyResolver = $collectionService->getDependencyResolver();
246 
247  foreach ($this->dataArray as $dataElement) {
248  $dependencyResolver->addElement($dataElement['table'], $dataElement['uid']);
249  }
250 
251  $this->dataArray = $collectionService->process($this->dataArray);
252  }
253 
261  protected function ‪getDataArray($start, $limit)
262  {
263  $dataArrayPart = [];
264  $dataArrayCount = count($this->dataArray);
265  $end = ($start + $limit < $dataArrayCount ? $start + $limit : $dataArrayCount);
266 
267  // Ensure that there are numerical indexes
268  $this->dataArray = array_values($this->dataArray);
269  for ($i = $start; $i < $end; $i++) {
270  $dataArrayPart[] = $this->dataArray[$i];
271  }
272 
273  // Ensure that collections are not cut for the pagination
274  if (!empty($this->dataArray[$i][self::GridColumn_Collection])) {
275  $collectionIdentifier = $this->dataArray[$i][‪self::GridColumn_Collection];
276  for ($i = $i + 1; $i < $dataArrayCount && $collectionIdentifier === $this->dataArray[$i][‪self::GridColumn_Collection]; $i++) {
277  $dataArrayPart[] = $this->dataArray[$i];
278  }
279  }
280 
281  // Suggested slot method:
282  // methodName(\TYPO3\CMS\Workspaces\Service\GridDataService $gridData, array $dataArray, $start, $limit, array $dataArrayPart)
283  list($this->dataArray, $start, $limit, $dataArrayPart) = $this->‪emitSignal(self::SIGNAL_GetDataArray_PostProcesss, $this->dataArray, $start, $limit, $dataArrayPart);
284  return $dataArrayPart;
285  }
286 
290  protected function ‪initializeWorkspacesCachingFramework()
291  {
292  $this->workspacesCache = GeneralUtility::makeInstance(CacheManager::class)->getCache('workspaces_cache');
293  }
294 
301  protected function ‪setDataArrayIntoCache(array $versions, $filterTxt)
302  {
303  $hash = $this->‪calculateHash($versions, $filterTxt);
304  $this->workspacesCache->set($hash, $this->dataArray, [(string)$this->currentWorkspace, 'user_' . ‪$GLOBALS['BE_USER']->user['uid']]);
305  }
306 
314  protected function ‪getDataArrayFromCache(array $versions, $filterTxt)
315  {
316  $cacheEntry = false;
317  $hash = $this->‪calculateHash($versions, $filterTxt);
318  $content = $this->workspacesCache->get($hash);
319  if ($content !== false) {
320  $this->dataArray = $content;
321  $cacheEntry = true;
322  }
323  return $cacheEntry;
324  }
325 
333  protected function ‪calculateHash(array $versions, $filterTxt)
334  {
335  $hashArray = [
336  ‪$GLOBALS['BE_USER']->workspace,
337  ‪$GLOBALS['BE_USER']->user['uid'],
338  $versions,
339  $filterTxt,
343  ];
344  $hash = md5(serialize($hashArray));
345  return $hash;
346  }
347 
352  protected function ‪sortDataArray()
353  {
354  if (is_array($this->dataArray)) {
355  switch ($this->sort) {
356  case 'uid':
357  case 'change':
358  case 'workspace_Tstamp':
359  case 't3ver_oid':
360  case 'liveid':
361  case 'livepid':
362  case 'languageValue':
363  uasort($this->dataArray, [$this, 'intSort']);
364  break;
365  case 'label_Workspace':
366  case 'label_Live':
367  case 'label_Stage':
368  case 'workspace_Title':
369  case 'path_Live':
370  // case 'path_Workspace': This is the first sorting attribute
371  uasort($this->dataArray, [$this, 'stringSort']);
372  break;
373  default:
374  // Do nothing
375  }
376  } else {
377  $this->logger->critical('Try to sort "' . $this->sort . '" in "\\TYPO3\\CMS\\Workspaces\\Service\\GridDataService::sortDataArray" but $this->dataArray is empty! This might be the bug #26422 which could not be reproduced yet.');
378  }
379  // Suggested slot method:
380  // methodName(\TYPO3\CMS\Workspaces\Service\GridDataService $gridData, array $dataArray, $sortColumn, $sortDirection)
381  list($this->dataArray, $this->sort, $this->sortDir) = $this->‪emitSignal(self::SIGNAL_SortDataArray_PostProcesss, $this->dataArray, $this->sort, $this->sortDir);
382  }
383 
391  protected function ‪intSort(array $a, array $b)
392  {
393  if (!$this->‪isSortable($a, $b)) {
394  return 0;
395  }
396  // First sort by using the page-path in current workspace
397  $path_cmp = strcasecmp($a['path_Workspace'], $b['path_Workspace']);
398  if ($path_cmp < 0) {
399  return $path_cmp;
400  }
401  if ($path_cmp == 0) {
402  if ($a[$this->sort] == $b[$this->sort]) {
403  return 0;
404  }
405  if ($this->sortDir === 'ASC') {
406  return $a[‪$this->sort] < $b[‪$this->sort] ? -1 : 1;
407  }
408  if ($this->sortDir === 'DESC') {
409  return $a[‪$this->sort] > $b[‪$this->sort] ? -1 : 1;
410  }
411  } elseif ($path_cmp > 0) {
412  return $path_cmp;
413  }
414  return 0;
415  }
416 
424  protected function ‪stringSort($a, $b)
425  {
426  if (!$this->‪isSortable($a, $b)) {
427  return 0;
428  }
429  $path_cmp = strcasecmp($a['path_Workspace'], $b['path_Workspace']);
430  if ($path_cmp < 0) {
431  return $path_cmp;
432  }
433  if ($path_cmp == 0) {
434  if ($a[$this->sort] == $b[$this->sort]) {
435  return 0;
436  }
437  if ($this->sortDir === 'ASC') {
438  return strcasecmp($a[$this->sort], $b[$this->sort]);
439  }
440  if ($this->sortDir === 'DESC') {
441  return strcasecmp($a[$this->sort], $b[$this->sort]) * -1;
442  }
443  } elseif ($path_cmp > 0) {
444  return $path_cmp;
445  }
446  return 0;
447  }
448 
458  protected function ‪isSortable(array $a, array $b)
459  {
460  return
463  ;
464  }
465 
474  protected function ‪isFilterTextInVisibleColumns($filterText, array $versionArray)
475  {
476  if (is_array(‪$GLOBALS['BE_USER']->uc['moduleData']['Workspaces'][‪$GLOBALS['BE_USER']->workspace]['columns'])) {
477  $visibleColumns = ‪$GLOBALS['BE_USER']->uc['moduleData']['Workspaces'][‪$GLOBALS['BE_USER']->workspace]['columns'];
478  } else {
479  $visibleColumns = [
480  'workspace_Formated_Tstamp' => ['hidden' => 0],
481  'change' => ['hidden' => 0],
482  'path_Workspace' => ['hidden' => 0],
483  'path_Live' => ['hidden' => 0],
484  'label_Live' => ['hidden' => 0],
485  'label_Stage' => ['hidden' => 0],
486  'label_Workspace' => ['hidden' => 0],
487  ];
488  }
489  foreach ($visibleColumns as $column => $value) {
490  if (isset($value['hidden']) && isset($column) && isset($versionArray[$column])) {
491  if ($value['hidden'] == 0) {
492  switch ($column) {
493  case 'workspace_Tstamp':
494  if (stripos($versionArray['workspace_Formated_Tstamp'], $filterText) !== false) {
495  return true;
496  }
497  break;
498  case 'change':
499  if (stripos(strval($versionArray[$column]), str_replace('%', '', $filterText)) !== false) {
500  return true;
501  }
502  break;
503  default:
504  if (stripos(strval($versionArray[$column]), $filterText) !== false) {
505  return true;
506  }
507  }
508  }
509  }
510  }
511  return false;
512  }
513 
522  protected function ‪workspaceState($stateId, $hiddenOnline = false, $hiddenOffline = false)
523  {
524  $hiddenState = null;
525  if ($hiddenOnline == 0 && $hiddenOffline == 1) {
526  $hiddenState = 'hidden';
527  } elseif ($hiddenOnline == 1 && $hiddenOffline == 0) {
528  $hiddenState = 'unhidden';
529  }
530  switch ($stateId) {
532  $state = 'new';
533  break;
535  $state = 'deleted';
536  break;
538  $state = 'moved';
539  break;
540  default:
541  $state = ($hiddenState ?: 'modified');
542  }
543  return $state;
544  }
545 
553  protected function ‪getTcaEnableColumnsFieldName($table, $type)
554  {
555  $fieldName = null;
556 
557  if (!empty(‪$GLOBALS['TCA'][$table]['ctrl']['enablecolumns'][$type])) {
558  $fieldName = ‪$GLOBALS['TCA'][$table]['ctrl']['enablecolumns'][$type];
559  }
560 
561  return $fieldName;
562  }
563 
572  protected function ‪getLanguageValue($table, array $record)
573  {
574  $languageValue = 0;
576  $languageField = ‪$GLOBALS['TCA'][$table]['ctrl']['languageField'];
577  if (!empty($record[$languageField])) {
578  $languageValue = $record[$languageField];
579  }
580  }
581  return $languageValue;
582  }
583 
593  protected function ‪getSystemLanguageValue($id, $pageId, $key)
594  {
595  $value = null;
596  $systemLanguages = $this->‪getSystemLanguages((int)$pageId);
597  if (!empty($systemLanguages[$id][$key])) {
598  $value = $systemLanguages[$id][$key];
599  }
600  return $value;
601  }
602 
609  public function ‪getSystemLanguages(int $pageId)
610  {
611  return GeneralUtility::makeInstance(TranslationConfigurationProvider::class)->getSystemLanguages($pageId);
612  }
613 
619  protected function ‪getIntegrityService()
620  {
621  if (!isset($this->integrityService)) {
622  $this->integrityService = GeneralUtility::makeInstance(IntegrityService::class);
623  }
625  }
626 
634  protected function ‪emitSignal($signalName, ...$arguments)
635  {
636  // Arguments are always ($this, [method argument], [method argument], ...)
637  $signalArguments = $arguments;
638  array_unshift($signalArguments, $this);
639  $slotReturn = $this->‪getSignalSlotDispatcher()->‪dispatch(GridDataService::class, $signalName, $signalArguments);
640  return array_slice($slotReturn, 1);
641  }
642 
646  protected function ‪getDependencyCollectionService()
647  {
648  return GeneralUtility::makeInstance(Dependency\CollectionService::class);
649  }
650 
654  protected function ‪getAdditionalColumnService()
655  {
656  return $this->‪getObjectManager()->‪get(AdditionalColumnService::class);
657  }
658 
662  protected function ‪getSignalSlotDispatcher()
663  {
664  return $this->‪getObjectManager()->‪get(Dispatcher::class);
665  }
666 
670  protected function ‪getObjectManager()
671  {
672  return GeneralUtility::makeInstance(ObjectManager::class);
673  }
674 }
‪TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL
‪const SIZE_SMALL
Definition: Icon.php:29
‪TYPO3\CMS\Workspaces\Service\GridDataService\sortDataArray
‪sortDataArray()
Definition: GridDataService.php:346
‪TYPO3\CMS\Workspaces\Service\IntegrityService\checkElement
‪checkElement(CombinedRecord $element)
Definition: IntegrityService.php:104
‪TYPO3\CMS\Workspaces\Service\GridDataService\getSignalSlotDispatcher
‪Dispatcher getSignalSlotDispatcher()
Definition: GridDataService.php:656
‪TYPO3\CMS\Workspaces\Service\GridDataService\$currentWorkspace
‪int $currentWorkspace
Definition: GridDataService.php:53
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord
Definition: CombinedRecord.php:23
‪TYPO3\CMS\Workspaces\Service\GridDataService\$workspacesCache
‪TYPO3 CMS Core Cache Frontend FrontendInterface $workspacesCache
Definition: GridDataService.php:75
‪TYPO3\CMS\Backend\Utility\BackendUtility\datetime
‪static string datetime($value)
Definition: BackendUtility.php:1190
‪TYPO3\CMS\Workspaces\Service
Definition: AdditionalColumnService.php:2
‪TYPO3\CMS\Core\Imaging\Icon
Definition: Icon.php:25
‪TYPO3\CMS\Workspaces\Service\GridDataService\getDependencyCollectionService
‪Dependency CollectionService getDependencyCollectionService()
Definition: GridDataService.php:640
‪TYPO3\CMS\Workspaces\Service\GridDataService\getSystemLanguages
‪array getSystemLanguages(int $pageId)
Definition: GridDataService.php:603
‪TYPO3\CMS\Workspaces\Service\GridDataService\getSystemLanguageValue
‪string null getSystemLanguageValue($id, $pageId, $key)
Definition: GridDataService.php:587
‪TYPO3\CMS\Workspaces\Service\GridDataService\initializeWorkspacesCachingFramework
‪initializeWorkspacesCachingFramework()
Definition: GridDataService.php:284
‪TYPO3\CMS\Workspaces\Service\GridDataService\$sortDir
‪string $sortDir
Definition: GridDataService.php:71
‪TYPO3\CMS\Workspaces\Service\GridDataService\intSort
‪int intSort(array $a, array $b)
Definition: GridDataService.php:385
‪TYPO3\CMS\Workspaces\Service\IntegrityService\getStatusRepresentation
‪string getStatusRepresentation($identifier=null)
Definition: IntegrityService.php:175
‪TYPO3\CMS\Workspaces\Service\GridDataService\getDataArrayFromCache
‪bool getDataArrayFromCache(array $versions, $filterTxt)
Definition: GridDataService.php:308
‪TYPO3\CMS\Workspaces\Service\GridDataService\generateDataArray
‪generateDataArray(array $versions, $filterTxt)
Definition: GridDataService.php:117
‪TYPO3\CMS\Core\Imaging\IconFactory
Definition: IconFactory.php:31
‪TYPO3\CMS\Workspaces\Service\GridDataService\stringSort
‪int stringSort($a, $b)
Definition: GridDataService.php:418
‪TYPO3\CMS\Core\Versioning\VersionState\DELETE_PLACEHOLDER
‪const DELETE_PLACEHOLDER
Definition: VersionState.php:54
‪TYPO3\CMS\Workspaces\Service\GridDataService\calculateHash
‪string calculateHash(array $versions, $filterTxt)
Definition: GridDataService.php:327
‪TYPO3\CMS\Workspaces\Service\GridDataService\isFilterTextInVisibleColumns
‪bool isFilterTextInVisibleColumns($filterText, array $versionArray)
Definition: GridDataService.php:468
‪TYPO3\CMS\Core\Versioning\VersionState\MOVE_POINTER
‪const MOVE_POINTER
Definition: VersionState.php:72
‪TYPO3\CMS\Workspaces\Service\AdditionalColumnService
Definition: AdditionalColumnService.php:27
‪TYPO3\CMS\Workspaces\Service\GridDataService\$sort
‪string $sort
Definition: GridDataService.php:65
‪TYPO3\CMS\Workspaces\Service\GridDataService\getAdditionalColumnService
‪AdditionalColumnService getAdditionalColumnService()
Definition: GridDataService.php:648
‪TYPO3\CMS\Workspaces\Service\StagesService\STAGE_PUBLISH_ID
‪const STAGE_PUBLISH_ID
Definition: StagesService.php:36
‪TYPO3\CMS\Workspaces\Service\GridDataService\isSortable
‪bool isSortable(array $a, array $b)
Definition: GridDataService.php:452
‪TYPO3\CMS\Workspaces\Service\GridDataService\SIGNAL_GetDataArray_PostProcesss
‪const SIGNAL_GetDataArray_PostProcesss
Definition: GridDataService.php:40
‪TYPO3\CMS\Workspaces\Service\GridDataService\GridColumn_CollectionCurrent
‪const GridColumn_CollectionCurrent
Definition: GridDataService.php:46
‪TYPO3\CMS\Workspaces\Service\GridDataService\generateGridListFromVersions
‪array generateGridListFromVersions($versions, $parameter, $currentWorkspace)
Definition: GridDataService.php:90
‪TYPO3\CMS\Workspaces\Service\GridDataService\workspaceState
‪string workspaceState($stateId, $hiddenOnline=false, $hiddenOffline=false)
Definition: GridDataService.php:516
‪TYPO3\CMS\Workspaces\Service\Dependency\CollectionService
Definition: CollectionService.php:26
‪TYPO3\CMS\Workspaces\Service\GridDataService\SIGNAL_GenerateDataArray_PostProcesss
‪const SIGNAL_GenerateDataArray_PostProcesss
Definition: GridDataService.php:39
‪TYPO3\CMS\Workspaces\Preview\PreviewUriBuilder
Definition: PreviewUriBuilder.php:39
‪TYPO3\CMS\Backend\Utility\BackendUtility\getRecordTitle
‪static string getRecordTitle($table, $row, $prep=false, $forceResult=true)
Definition: BackendUtility.php:1811
‪TYPO3\CMS\Workspaces\Service\IntegrityService
Definition: IntegrityService.php:26
‪TYPO3\CMS\Core\Cache\CacheManager
Definition: CacheManager.php:34
‪TYPO3\CMS\Extbase\SignalSlot\Dispatcher\dispatch
‪mixed dispatch($signalClassName, $signalName, array $signalArguments=[])
Definition: Dispatcher.php:115
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\createFromArrays
‪static CombinedRecord createFromArrays($table, array $liveRow, array $versionRow)
Definition: CombinedRecord.php:59
‪TYPO3\CMS\Workspaces\Service\GridDataService\getTcaEnableColumnsFieldName
‪string null getTcaEnableColumnsFieldName($table, $type)
Definition: GridDataService.php:547
‪TYPO3\CMS\Workspaces\Service\GridDataService\getObjectManager
‪ObjectManager getObjectManager()
Definition: GridDataService.php:664
‪TYPO3\CMS\Backend\Utility\BackendUtility
Definition: BackendUtility.php:72
‪TYPO3\CMS\Backend\Utility\BackendUtility\getRecord
‪static array null getRecord($table, $uid, $fields=' *', $where='', $useDeleteClause=true)
Definition: BackendUtility.php:130
‪TYPO3\CMS\Core\Versioning\VersionState
Definition: VersionState.php:23
‪TYPO3\CMS\Workspaces\Service\GridDataService\getLanguageValue
‪int getLanguageValue($table, array $record)
Definition: GridDataService.php:566
‪TYPO3\CMS\Workspaces\Service\GridDataService\GridColumn_CollectionLevel
‪const GridColumn_CollectionLevel
Definition: GridDataService.php:44
‪TYPO3\CMS\Core\Versioning\VersionState\NEW_PLACEHOLDER_VERSION
‪const NEW_PLACEHOLDER_VERSION
Definition: VersionState.php:32
‪TYPO3\CMS\Workspaces\Service\GridDataService\emitSignal
‪array emitSignal($signalName,... $arguments)
Definition: GridDataService.php:628
‪TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider
Definition: TranslationConfigurationProvider.php:35
‪TYPO3\CMS\Backend\Utility\BackendUtility\isTableLocalizable
‪static bool isTableLocalizable($table)
Definition: BackendUtility.php:616
‪TYPO3\CMS\Workspaces\Service\GridDataService\getIntegrityService
‪IntegrityService getIntegrityService()
Definition: GridDataService.php:613
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Workspaces\Service\GridDataService\$dataArray
‪array $dataArray
Definition: GridDataService.php:59
‪TYPO3\CMS\Extbase\Object\ObjectManager\get
‪object &T get($objectName,... $constructorArguments)
Definition: ObjectManager.php:94
‪TYPO3\CMS\Workspaces\Service\GridDataService\GridColumn_Collection
‪const GridColumn_Collection
Definition: GridDataService.php:43
‪TYPO3\CMS\Workspaces\Service\GridDataService\GridColumn_CollectionParent
‪const GridColumn_CollectionParent
Definition: GridDataService.php:45
‪TYPO3\CMS\Workspaces\Service\GridDataService\GridColumn_CollectionChildren
‪const GridColumn_CollectionChildren
Definition: GridDataService.php:47
‪TYPO3\CMS\Workspaces\Service\GridDataService\getDataArray
‪array getDataArray($start, $limit)
Definition: GridDataService.php:255
‪TYPO3\CMS\Workspaces\Service\GridDataService\setDataArrayIntoCache
‪setDataArrayIntoCache(array $versions, $filterTxt)
Definition: GridDataService.php:295
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:45
‪TYPO3\CMS\Backend\Utility\BackendUtility\getRecordPath
‪static mixed getRecordPath($uid, $clause, $titleLimit, $fullTitleLimit=0)
Definition: BackendUtility.php:572
‪TYPO3\CMS\Extbase\Object\ObjectManager
Definition: ObjectManager.php:25
‪TYPO3\CMS\Workspaces\Service\GridDataService\$integrityService
‪IntegrityService $integrityService
Definition: GridDataService.php:79
‪TYPO3\CMS\Workspaces\Service\GridDataService\SIGNAL_SortDataArray_PostProcesss
‪const SIGNAL_SortDataArray_PostProcesss
Definition: GridDataService.php:41
‪TYPO3\CMS\Workspaces\Service\GridDataService\SIGNAL_GenerateDataArray_BeforeCaching
‪const SIGNAL_GenerateDataArray_BeforeCaching
Definition: GridDataService.php:38
‪TYPO3\CMS\Workspaces\Service\GridDataService\resolveDataArrayDependencies
‪resolveDataArrayDependencies()
Definition: GridDataService.php:236
‪TYPO3\CMS\Workspaces\Service\WorkspaceService\getWorkspaceTitle
‪static string getWorkspaceTitle($wsId)
Definition: WorkspaceService.php:107
‪TYPO3\CMS\Workspaces\Service\GridDataService
Definition: GridDataService.php:35
‪TYPO3\CMS\Extbase\SignalSlot\Dispatcher
Definition: Dispatcher.php:28