‪TYPO3CMS  11.5
TreeController.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\ResponseInterface;
21 use Psr\Http\Message\ServerRequestInterface;
25 use TYPO3\CMS\Backend\Utility\BackendUtility;
42 
48 {
54  protected ‪$useNavTitle = false;
55 
61  protected ‪$addIdAsPrefix = false;
62 
68  protected ‪$addDomainName = false;
69 
75  protected ‪$showMountPathAboveMounts = false;
76 
82  protected ‪$backgroundColors = [];
83 
89  protected ‪$hiddenRecords = [];
90 
96  protected ‪$expandedState = [];
97 
103  protected ‪$iconFactory;
104 
110  protected ‪$levelsToFetch = 2;
111 
116  protected ‪$expandAllNodes = false;
117 
122  protected array ‪$alternativeEntryPoints = [];
123 
124  protected ‪UriBuilder ‪$uriBuilder;
125 
128 
132  public function ‪__construct()
133  {
134  $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
135  $this->uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
136  }
137 
138  protected function ‪initializeConfiguration(ServerRequestInterface $request)
139  {
140  if ($request->getQueryParams()['readOnly'] ?? false) {
142  }
143  if ($request->getQueryParams()['alternativeEntryPoints'] ?? false) {
144  $this->alternativeEntryPoints = $request->getQueryParams()['alternativeEntryPoints'];
145  $this->alternativeEntryPoints = array_filter($this->alternativeEntryPoints, function ($pageId) {
146  return $this->‪getBackendUser()->‪isInWebMount($pageId) !== null;
147  });
148  $this->alternativeEntryPoints = array_map('intval', $this->alternativeEntryPoints);
149  $this->alternativeEntryPoints = array_unique($this->alternativeEntryPoints);
150  }
151  $userTsConfig = $this->‪getBackendUser()->‪getTSConfig();
152  $this->hiddenRecords = ‪GeneralUtility::intExplode(
153  ',',
154  $userTsConfig['options.']['hideRecords.']['pages'] ?? '',
155  true
156  );
157  $this->backgroundColors = $userTsConfig['options.']['pageTree.']['backgroundColor.'] ?? [];
158  $this->addIdAsPrefix = (bool)($userTsConfig['options.']['pageTree.']['showPageIdWithTitle'] ?? false);
159  $this->addDomainName = (bool)($userTsConfig['options.']['pageTree.']['showDomainNameWithTitle'] ?? false);
160  $this->useNavTitle = (bool)($userTsConfig['options.']['pageTree.']['showNavTitle'] ?? false);
161  $this->showMountPathAboveMounts = (bool)($userTsConfig['options.']['pageTree.']['showPathAboveMounts'] ?? false);
162  $backendUserConfiguration = GeneralUtility::makeInstance(BackendUserConfiguration::class);
163  $backendUserPageTreeState = $backendUserConfiguration->get('BackendComponents.States.Pagetree');
164  if (is_object($backendUserPageTreeState) && is_object($backendUserPageTreeState->stateHash)) {
165  $this->expandedState = (array)$backendUserPageTreeState->stateHash;
166  } else {
167  $stateHash = $backendUserPageTreeState['stateHash'] ?? [];
168  $this->expandedState = is_array($stateHash) ? $stateHash : [];
169  }
170  $this->userHasAccessToModifyPagesAndToDefaultLanguage = $this->‪getBackendUser()->‪check('tables_modify', 'pages') && $this->‪getBackendUser()->‪checkLanguageAccess(0);
171  }
172 
178  public function ‪fetchConfigurationAction(): ResponseInterface
179  {
180  $configuration = [
181  'allowDragMove' => $this->‪isDragMoveAllowed(),
182  'doktypes' => $this->‪getDokTypes(),
183  'displayDeleteConfirmation' => $this->‪getBackendUser()->‪jsConfirmation(‪JsConfirmation::DELETE),
184  'temporaryMountPoint' => $this->‪getMountPointPath((int)($this->‪getBackendUser()->uc['pageTree_temporaryMountPoint'] ?? 0)),
185  'showIcons' => true,
186  'dataUrl' => (string)$this->uriBuilder->buildUriFromRoute('ajax_page_tree_data'),
187  'filterUrl' => (string)$this->uriBuilder->buildUriFromRoute('ajax_page_tree_filter'),
188  'setTemporaryMountPointUrl' => (string)$this->uriBuilder->buildUriFromRoute('ajax_page_tree_set_temporary_mount_point'),
189  ];
190 
191  return new ‪JsonResponse($configuration);
192  }
193 
194  public function ‪fetchReadOnlyConfigurationAction(ServerRequestInterface $request): ResponseInterface
195  {
196  $entryPoints = $request->getQueryParams()['alternativeEntryPoints'] ?? '';
197  $entryPoints = ‪GeneralUtility::intExplode(',', $entryPoints, true);
198  $additionalArguments = [
199  'readOnly' => 1,
200  ];
201  if (!empty($entryPoints)) {
202  $additionalArguments['alternativeEntryPoints'] = $entryPoints;
203  }
204  $configuration = [
205  'displayDeleteConfirmation' => $this->‪getBackendUser()->‪jsConfirmation(‪JsConfirmation::DELETE),
206  'temporaryMountPoint' => $this->‪getMountPointPath((int)($this->‪getBackendUser()->uc['pageTree_temporaryMountPoint'] ?? 0)),
207  'showIcons' => true,
208  'dataUrl' => (string)$this->uriBuilder->buildUriFromRoute('ajax_page_tree_data', $additionalArguments),
209  'filterUrl' => (string)$this->uriBuilder->buildUriFromRoute('ajax_page_tree_filter', $additionalArguments),
210  'setTemporaryMountPointUrl' => (string)$this->uriBuilder->buildUriFromRoute('ajax_page_tree_set_temporary_mount_point'),
211  ];
212  return new ‪JsonResponse($configuration);
213  }
214 
223  protected function ‪getDokTypes(): array
224  {
225  $backendUser = $this->‪getBackendUser();
226  $doktypeLabelMap = [];
227  foreach (‪$GLOBALS['TCA']['pages']['columns']['doktype']['config']['items'] as $doktypeItemConfig) {
228  if ($doktypeItemConfig[1] === '--div--') {
229  continue;
230  }
231  $doktypeLabelMap[$doktypeItemConfig[1]] = $doktypeItemConfig[0];
232  }
233  $doktypes = ‪GeneralUtility::intExplode(',', $backendUser->getTSConfig()['options.']['pageTree.']['doktypesToShowInNewPageDragArea'] ?? '', true);
234  $doktypes = array_unique($doktypes);
235  ‪$output = [];
236  $allowedDoktypes = ‪GeneralUtility::intExplode(',', $backendUser->groupData['pagetypes_select'], true);
237  $isAdmin = $backendUser->isAdmin();
238  // Early return if backend user may not create any doktype
239  if (!$isAdmin && empty($allowedDoktypes)) {
240  return ‪$output;
241  }
242  foreach ($doktypes as $doktype) {
243  if (!isset($doktypeLabelMap[$doktype]) || (!$isAdmin && !in_array($doktype, $allowedDoktypes, true))) {
244  continue;
245  }
246  $label = htmlspecialchars($this->‪getLanguageService()->sL($doktypeLabelMap[$doktype]));
247  ‪$output[] = [
248  'nodeType' => $doktype,
249  'icon' => ‪$GLOBALS['TCA']['pages']['ctrl']['typeicon_classes'][$doktype] ?? '',
250  'title' => $label,
251  'tooltip' => $label,
252  ];
253  }
254  return ‪$output;
255  }
256 
263  public function ‪fetchDataAction(ServerRequestInterface $request): ResponseInterface
264  {
265  $this->‪initializeConfiguration($request);
266 
267  $items = [];
268  if (!empty($request->getQueryParams()['pid'])) {
269  // Fetching a part of a page tree
270  $entryPoints = $this->‪getAllEntryPointPageTrees((int)$request->getQueryParams()['pid']);
271  $mountPid = (int)($request->getQueryParams()['mount'] ?? 0);
272  $parentDepth = (int)($request->getQueryParams()['pidDepth'] ?? 0);
273  $this->levelsToFetch = $parentDepth + ‪$this->levelsToFetch;
274  foreach ($entryPoints as $page) {
275  $items[] = $this->‪pagesToFlatArray($page, $mountPid, $parentDepth);
276  }
277  } else {
278  $entryPoints = $this->‪getAllEntryPointPageTrees();
279  foreach ($entryPoints as $page) {
280  $items[] = $this->‪pagesToFlatArray($page, (int)$page['uid']);
281  }
282  }
283  $items = array_merge(...$items);
284 
285  return new ‪JsonResponse($items);
286  }
287 
294  public function ‪filterDataAction(ServerRequestInterface $request): ResponseInterface
295  {
296  $searchQuery = $request->getQueryParams()['q'] ?? '';
297  if (trim($searchQuery) === '') {
298  return new ‪JsonResponse([]);
299  }
300 
301  $this->‪initializeConfiguration($request);
302  $this->expandAllNodes = true;
303 
304  $items = [];
305  $entryPoints = $this->‪getAllEntryPointPageTrees(0, $searchQuery);
306 
307  foreach ($entryPoints as $page) {
308  if (!empty($page)) {
309  $items[] = $this->‪pagesToFlatArray($page, (int)$page['uid']);
310  }
311  }
312  $items = array_merge(...$items);
313 
314  return new ‪JsonResponse($items);
315  }
316 
324  public function ‪setTemporaryMountPointAction(ServerRequestInterface $request): ResponseInterface
325  {
326  if (empty($request->getParsedBody()['pid'])) {
327  throw new \RuntimeException(
328  'Required "pid" parameter is missing.',
329  1511792197
330  );
331  }
332  $pid = (int)$request->getParsedBody()['pid'];
333 
334  $this->‪getBackendUser()->uc['pageTree_temporaryMountPoint'] = $pid;
335  $this->‪getBackendUser()->‪writeUC();
336  $response = [
337  'mountPointPath' => $this->‪getMountPointPath($pid),
338  ];
339  return new ‪JsonResponse($response);
340  }
341 
354  protected function ‪pagesToFlatArray(array $page, int $entryPoint, int $depth = 0, array $inheritedData = []): array
355  {
356  $backendUser = $this->‪getBackendUser();
357  $pageId = (int)$page['uid'];
358  if (in_array($pageId, $this->hiddenRecords, true)) {
359  return [];
360  }
361 
362  $stopPageTree = !empty($page['php_tree_stop']) && $depth > 0;
363  $identifier = $entryPoint . '_' . $pageId;
364  $expanded = !empty($page['expanded'])
365  || (isset($this->expandedState[$identifier]) && $this->expandedState[$identifier])
366  || $this->expandAllNodes;
367 
368  $backgroundColor = !empty($this->backgroundColors[$pageId]) ? $this->backgroundColors[$pageId] : ($inheritedData['backgroundColor'] ?? '');
369 
370  $suffix = '';
371  $prefix = '';
372  $nameSourceField = 'title';
373  $visibleText = $page['title'];
374  $tooltip = BackendUtility::titleAttribForPages($page, '', false);
375  if ($pageId !== 0) {
376  $icon = $this->iconFactory->getIconForRecord('pages', $page, ‪Icon::SIZE_SMALL);
377  } else {
378  $icon = $this->iconFactory->getIcon('apps-pagetree-root', ‪Icon::SIZE_SMALL);
379  }
380 
381  if ($this->useNavTitle && trim($page['nav_title'] ?? '') !== '') {
382  $nameSourceField = 'nav_title';
383  $visibleText = $page['nav_title'];
384  }
385  if (trim($visibleText) === '') {
386  $visibleText = htmlspecialchars('[' . $this->‪getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.no_title') . ']');
387  }
388 
389  if ($this->addDomainName && ($page['is_siteroot'] ?? false)) {
390  $domain = $this->‪getDomainNameForPage($pageId);
391  $suffix = $domain !== '' ? ' [' . $domain . ']' : '';
392  }
393 
394  $lockInfo = BackendUtility::isRecordLocked('pages', $pageId);
395  if (is_array($lockInfo)) {
396  $tooltip .= ' - ' . $lockInfo['msg'];
397  }
398  if ($this->addIdAsPrefix) {
399  $prefix = htmlspecialchars('[' . $pageId . '] ');
400  }
401 
402  $items = [];
403  $item = [
404  // Used to track if the tree item is collapsed or not
405  'stateIdentifier' => $identifier,
406  // identifier is not only used for pages, therefore it's a string
407  'identifier' => (string)$pageId,
408  'depth' => $depth,
409  // fine in JSON - if used in HTML directly, e.g. quotes can be used for XSS
410  'tip' => strip_tags(htmlspecialchars_decode($tooltip)),
411  'icon' => $icon->getIdentifier(),
412  'name' => $visibleText,
413  'type' => (int)($page['doktype'] ?? 0),
414  'nameSourceField' => $nameSourceField,
415  'mountPoint' => $entryPoint,
416  'workspaceId' => !empty($page['t3ver_oid']) ? $page['t3ver_oid'] : $pageId,
417  'siblingsCount' => $page['siblingsCount'] ?? 1,
418  'siblingsPosition' => $page['siblingsPosition'] ?? 1,
419  'allowDelete' => $backendUser->doesUserHaveAccess($page, ‪Permission::PAGE_DELETE),
420  'allowEdit' => $this->userHasAccessToModifyPagesAndToDefaultLanguage && $backendUser->doesUserHaveAccess($page, ‪Permission::PAGE_EDIT),
421  ];
422 
423  if (!empty($page['_children']) || $this->pageTreeRepository->hasChildren($pageId)) {
424  $item['hasChildren'] = true;
425  if ($depth >= $this->levelsToFetch) {
426  $page = $this->pageTreeRepository->getTreeLevels($page, 1);
427  }
428  }
429  if (!empty($prefix)) {
430  $item['prefix'] = htmlspecialchars($prefix);
431  }
432  if (!empty($suffix)) {
433  $item['suffix'] = htmlspecialchars($suffix);
434  }
435  if (is_array($lockInfo)) {
436  $item['locked'] = true;
437  }
438  if ($icon->getOverlayIcon()) {
439  $item['overlayIcon'] = $icon->getOverlayIcon()->getIdentifier();
440  }
441  if ($expanded && is_array($page['_children']) && !empty($page['_children'])) {
442  $item['expanded'] = true;
443  }
444  if ($backgroundColor) {
445  $item['backgroundColor'] = htmlspecialchars($backgroundColor);
446  }
447  if ($stopPageTree) {
448  $item['stopPageTree'] = true;
449  }
450  $class = $this->‪resolvePageCssClassNames($page);
451  if (!empty($class)) {
452  $item['class'] = $class;
453  }
454  if ($depth === 0) {
455  $item['isMountPoint'] = true;
456 
457  if ($this->showMountPathAboveMounts) {
458  $item['readableRootline'] = $this->‪getMountPointPath($pageId);
459  }
460  }
461 
462  $items[] = $item;
463  if (!$stopPageTree && is_array($page['_children']) && !empty($page['_children']) && ($depth < $this->levelsToFetch || $expanded)) {
464  $siblingsCount = count($page['_children']);
465  $siblingsPosition = 0;
466  $items[key($items)]['loaded'] = true;
467  foreach ($page['_children'] as $child) {
468  $child['siblingsCount'] = $siblingsCount;
469  $child['siblingsPosition'] = ++$siblingsPosition;
470  $items = array_merge($items, $this->‪pagesToFlatArray($child, $entryPoint, $depth + 1, ['backgroundColor' => $backgroundColor]));
471  }
472  }
473  return $items;
474  }
475 
476  protected function ‪initializePageTreeRepository(): PageTreeRepository
477  {
478  $backendUser = $this->‪getBackendUser();
479  $userTsConfig = $backendUser->getTSConfig();
480  $excludedDocumentTypes = ‪GeneralUtility::intExplode(',', $userTsConfig['options.']['pageTree.']['excludeDoktypes'] ?? '', true);
481 
482  $additionalQueryRestrictions = [];
483  if ($excludedDocumentTypes !== []) {
484  $additionalQueryRestrictions[] = GeneralUtility::makeInstance(DocumentTypeExclusionRestriction::class, $excludedDocumentTypes);
485  }
486 
487  return GeneralUtility::makeInstance(
488  PageTreeRepository::class,
489  (int)$backendUser->workspace,
490  [],
491  $additionalQueryRestrictions
492  );
493  }
494 
502  protected function ‪getAllEntryPointPageTrees(int $startPid = 0, string $query = ''): array
503  {
504  $this->pageTreeRepository ??= $this->‪initializePageTreeRepository();
505  $backendUser = $this->‪getBackendUser();
506  if ($startPid === 0) {
507  $startPid = (int)($backendUser->uc['pageTree_temporaryMountPoint'] ?? 0);
508  }
509 
510  $entryPointIds = null;
511  if ($startPid > 0) {
512  $entryPointIds = [$startPid];
513  } elseif (!empty($this->alternativeEntryPoints)) {
514  $entryPointIds = ‪$this->alternativeEntryPoints;
515  }
516 
517  $permClause = $backendUser->getPagePermsClause(‪Permission::PAGE_SHOW);
518  if ($query !== '') {
519  $this->levelsToFetch = 999;
520  $this->pageTreeRepository->fetchFilteredTree(
521  $query,
522  $this->‪getAllowedMountPoints(),
523  $permClause
524  );
525  }
526  $rootRecord = [
527  'uid' => 0,
528  'title' => ‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] ?: 'TYPO3',
529  ];
530  $entryPointRecords = [];
531  $mountPoints = [];
532  if ($entryPointIds === null) {
533  //watch out for deleted pages returned as webmount
534  $mountPoints = array_map('intval', $backendUser->returnWebmounts());
535  $mountPoints = array_unique($mountPoints);
536  $mountPoints = array_filter($mountPoints, fn($id) => !in_array($id, $this->hiddenRecords, true));
537 
538  // Switch to multiple-entryPoint-mode if the rootPage is to be mounted.
539  // (other mounts would appear duplicated in the pid = 0 tree otherwise)
540  if (in_array(0, $mountPoints, true)) {
541  $entryPointIds = $mountPoints;
542  }
543  }
544 
545  if ($entryPointIds === null) {
546  if ($query !== '') {
547  $rootRecord = $this->pageTreeRepository->getTree(0, null, $mountPoints, true);
548  } else {
549  $rootRecord = $this->pageTreeRepository->getTreeLevels($rootRecord, $this->levelsToFetch, $mountPoints);
550  }
551 
552  $mountPointOrdering = array_flip($mountPoints);
553  if (isset($rootRecord['_children'])) {
554  usort($rootRecord['_children'], static function ($a, $b) use ($mountPointOrdering) {
555  return ($mountPointOrdering[$a['uid']] ?? 0) <=> ($mountPointOrdering[$b['uid']] ?? 0);
556  });
557  }
558 
559  $entryPointRecords[] = $rootRecord;
560  } else {
561  $entryPointIds = array_filter($entryPointIds, fn($id) => !in_array($id, $this->hiddenRecords, true));
562  $this->‪calculateBackgroundColors($entryPointIds);
563  foreach ($entryPointIds as $k => $entryPointId) {
564  if ($entryPointId === 0) {
565  $entryPointRecord = $rootRecord;
566  } else {
567  $entryPointRecord = BackendUtility::getRecordWSOL('pages', $entryPointId, '*', $permClause);
568 
569  if ($entryPointRecord !== null && !$backendUser->isInWebMount($entryPointId)) {
570  $entryPointRecord = null;
571  }
572  if ($entryPointRecord === null) {
573  continue;
574  }
575  }
576 
577  $entryPointRecord['uid'] = (int)$entryPointRecord['uid'];
578  if ($query === '') {
579  $entryPointRecord = $this->pageTreeRepository->getTreeLevels($entryPointRecord, $this->levelsToFetch);
580  } else {
581  $entryPointRecord = $this->pageTreeRepository->getTree($entryPointRecord['uid'], null, $entryPointIds, true);
582  }
583 
584  if (is_array($entryPointRecord) && !empty($entryPointRecord)) {
585  $entryPointRecords[$k] = $entryPointRecord;
586  }
587  }
588  }
589 
590  return $entryPointRecords;
591  }
592 
593  protected function ‪calculateBackgroundColors(array $pageIds)
594  {
595  foreach ($pageIds as $pageId) {
596  if (!empty($this->backgroundColors) && is_array($this->backgroundColors)) {
597  try {
598  $entryPointRootLine = GeneralUtility::makeInstance(RootlineUtility::class, $pageId)->get();
599  } catch (RootLineException $e) {
600  $entryPointRootLine = [];
601  }
602  foreach ($entryPointRootLine as $rootLineEntry) {
603  $parentUid = $rootLineEntry['uid'];
604  if (!empty($this->backgroundColors[$parentUid]) && empty($this->backgroundColors[$pageId])) {
605  $this->backgroundColors[$pageId] = $this->backgroundColors[$parentUid];
606  }
607  }
608  }
609  }
610  }
611 
618  protected function ‪getDomainNameForPage(int $pageId): string
619  {
620  $domain = '';
621  $siteFinder = GeneralUtility::makeInstance(SiteFinder::class);
622  try {
623  $site = $siteFinder->getSiteByRootPageId($pageId);
624  $domain = (string)$site->getBase();
625  } catch (SiteNotFoundException $e) {
626  // No site found
627  }
628 
629  return $domain;
630  }
631 
638  protected function ‪getMountPointPath(int $uid): string
639  {
640  if ($uid <= 0) {
641  return '';
642  }
643  $rootline = array_reverse(BackendUtility::BEgetRootLine($uid));
644  array_shift($rootline);
645  $path = [];
646  foreach ($rootline as $rootlineElement) {
647  $record = BackendUtility::getRecordWSOL('pages', $rootlineElement['uid'], 'title, nav_title', '', true, true);
648  $text = $record['title'];
649  if ($this->useNavTitle && trim($record['nav_title'] ?? '') !== '') {
650  $text = $record['nav_title'];
651  }
652  $path[] = htmlspecialchars($text);
653  }
654  return '/' . implode('/', $path);
655  }
656 
663  protected function ‪resolvePageCssClassNames(array $page): string
664  {
665  $classes = [];
666 
667  if ($page['uid'] === 0) {
668  return '';
669  }
670  $workspaceId = (int)$this->‪getBackendUser()->workspace;
671  if ($workspaceId > 0 && ‪ExtensionManagementUtility::isLoaded('workspaces')) {
672  if ((int)$page['t3ver_wsid'] === $workspaceId
673  && ((int)$page['t3ver_oid'] > 0 || (int)$page['t3ver_state'] === ‪VersionState::NEW_PLACEHOLDER)
674  ) {
675  $classes[] = 'ver-element';
676  $classes[] = 'ver-versions';
677  } elseif (
678  $this->‪getWorkspaceService()->hasPageRecordVersions(
679  $workspaceId,
680  $page['t3ver_oid'] ?: $page['uid']
681  )
682  ) {
683  $classes[] = 'ver-versions';
684  }
685  }
686 
687  return implode(' ', $classes);
688  }
689 
695  protected function ‪isDragMoveAllowed(): bool
696  {
697  $backendUser = $this->‪getBackendUser();
698  return $backendUser->isAdmin()
699  || ($backendUser->check('tables_modify', 'pages') && $backendUser->checkLanguageAccess(0));
700  }
701 
707  protected function ‪getAllowedMountPoints(): array
708  {
709  $mountPoints = (int)($this->‪getBackendUser()->uc['pageTree_temporaryMountPoint'] ?? 0);
710  if (!$mountPoints) {
711  if (!empty($this->alternativeEntryPoints)) {
713  }
714  $mountPoints = array_map('intval', $this->‪getBackendUser()->returnWebmounts());
715  return array_unique($mountPoints);
716  }
717  return [$mountPoints];
718  }
719 
723  protected function ‪getWorkspaceService(): WorkspaceService
724  {
725  return GeneralUtility::makeInstance(WorkspaceService::class);
726  }
727 
731  protected function ‪getBackendUser(): BackendUserAuthentication
732  {
733  return ‪$GLOBALS['BE_USER'];
734  }
735 
739  protected function ‪getLanguageService(): ?LanguageService
740  {
741  return ‪$GLOBALS['LANG'] ?? null;
742  }
743 }
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$iconFactory
‪IconFactory $iconFactory
Definition: TreeController.php:95
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$pageTreeRepository
‪PageTreeRepository $pageTreeRepository
Definition: TreeController.php:116
‪TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL
‪const SIZE_SMALL
Definition: Icon.php:30
‪TYPO3\CMS\Core\Database\Query\Restriction\DocumentTypeExclusionRestriction
Definition: DocumentTypeExclusionRestriction.php:27
‪TYPO3\CMS\Backend\Controller\Page\TreeController\getAllowedMountPoints
‪int[] getAllowedMountPoints()
Definition: TreeController.php:697
‪TYPO3\CMS\Backend\Controller\Page\TreeController\getDomainNameForPage
‪string getDomainNameForPage(int $pageId)
Definition: TreeController.php:608
‪TYPO3\CMS\Core\Versioning\VersionState\NEW_PLACEHOLDER
‪const NEW_PLACEHOLDER
Definition: VersionState.php:53
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$uriBuilder
‪UriBuilder $uriBuilder
Definition: TreeController.php:114
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\writeUC
‪writeUC($variable='')
Definition: AbstractUserAuthentication.php:984
‪TYPO3\CMS\Backend\Controller\Page\TreeController\pagesToFlatArray
‪array pagesToFlatArray(array $page, int $entryPoint, int $depth=0, array $inheritedData=[])
Definition: TreeController.php:344
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$addDomainName
‪bool $addDomainName
Definition: TreeController.php:65
‪TYPO3\CMS\Core\Imaging\Icon
Definition: Icon.php:26
‪TYPO3\CMS\Backend\Controller\Page\TreeController\getWorkspaceService
‪WorkspaceService getWorkspaceService()
Definition: TreeController.php:713
‪TYPO3\CMS\Backend\Controller\Page\TreeController\getMountPointPath
‪string getMountPointPath(int $uid)
Definition: TreeController.php:628
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getTSConfig
‪array getTSConfig()
Definition: BackendUserAuthentication.php:1000
‪TYPO3\CMS\Backend\Controller\Page\TreeController\getLanguageService
‪LanguageService null getLanguageService()
Definition: TreeController.php:729
‪TYPO3\CMS\Backend\Controller\Page\TreeController\initializeConfiguration
‪initializeConfiguration(ServerRequestInterface $request)
Definition: TreeController.php:128
‪TYPO3\CMS\Core\Utility\RootlineUtility
Definition: RootlineUtility.php:38
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication\check
‪bool check($type, $value)
Definition: BackendUserAuthentication.php:585
‪TYPO3\CMS\Core\Exception\SiteNotFoundException
Definition: SiteNotFoundException.php:25
‪TYPO3\CMS\Core\Site\SiteFinder
Definition: SiteFinder.php:31
‪TYPO3\CMS\Backend\Controller\Page\TreeController
Definition: TreeController.php:48
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$expandedState
‪array $expandedState
Definition: TreeController.php:89
‪TYPO3\CMS\Core\Imaging\IconFactory
Definition: IconFactory.php:34
‪TYPO3\CMS\Backend\Controller\Page\TreeController\filterDataAction
‪ResponseInterface filterDataAction(ServerRequestInterface $request)
Definition: TreeController.php:284
‪TYPO3\CMS\Backend\Controller\Page\TreeController\resolvePageCssClassNames
‪string resolvePageCssClassNames(array $page)
Definition: TreeController.php:653
‪TYPO3\CMS\Backend\Controller\Page\TreeController\calculateBackgroundColors
‪calculateBackgroundColors(array $pageIds)
Definition: TreeController.php:583
‪TYPO3\CMS\Backend\Controller\Page
Definition: LocalizationController.php:18
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$levelsToFetch
‪int $levelsToFetch
Definition: TreeController.php:101
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$alternativeEntryPoints
‪array $alternativeEntryPoints
Definition: TreeController.php:112
‪TYPO3\CMS\Core\Type\Bitmask\Permission
Definition: Permission.php:26
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility
Definition: ExtensionManagementUtility.php:43
‪TYPO3\CMS\Core\Type\Bitmask\JsConfirmation\DELETE
‪const DELETE
Definition: JsConfirmation.php:39
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$backgroundColors
‪array $backgroundColors
Definition: TreeController.php:77
‪TYPO3\CMS\Backend\Controller\Page\TreeController\isDragMoveAllowed
‪bool isDragMoveAllowed()
Definition: TreeController.php:685
‪TYPO3\CMS\Backend\Configuration\BackendUserConfiguration
Definition: BackendUserConfiguration.php:30
‪TYPO3\CMS\Backend\Routing\UriBuilder
Definition: UriBuilder.php:40
‪TYPO3\CMS\Backend\Controller\Page\TreeController\initializePageTreeRepository
‪initializePageTreeRepository()
Definition: TreeController.php:466
‪TYPO3\CMS\Backend\Controller\Page\TreeController\fetchConfigurationAction
‪ResponseInterface fetchConfigurationAction()
Definition: TreeController.php:168
‪TYPO3\CMS\Backend\Controller\Page\TreeController\fetchDataAction
‪ResponseInterface fetchDataAction(ServerRequestInterface $request)
Definition: TreeController.php:253
‪TYPO3\CMS\Backend\Controller\Page\TreeController\getBackendUser
‪BackendUserAuthentication getBackendUser()
Definition: TreeController.php:721
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkLanguageAccess
‪bool checkLanguageAccess($langValue)
Definition: BackendUserAuthentication.php:670
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
Definition: BackendUserAuthentication.php:62
‪TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_SHOW
‪const PAGE_SHOW
Definition: Permission.php:35
‪TYPO3\CMS\Workspaces\Service\WorkspaceService
Definition: WorkspaceService.php:36
‪TYPO3\CMS\Core\Versioning\VersionState
Definition: VersionState.php:24
‪$output
‪$output
Definition: annotationChecker.php:121
‪TYPO3\CMS\Backend\Controller\Page\TreeController\__construct
‪__construct()
Definition: TreeController.php:122
‪TYPO3\CMS\Backend\Controller\Page\TreeController\getDokTypes
‪array getDokTypes()
Definition: TreeController.php:213
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$expandAllNodes
‪bool $expandAllNodes
Definition: TreeController.php:106
‪TYPO3\CMS\Core\Http\JsonResponse
Definition: JsonResponse.php:28
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Backend\Tree\Repository\PageTreeRepository
Definition: PageTreeRepository.php:41
‪TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_EDIT
‪const PAGE_EDIT
Definition: Permission.php:40
‪TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_DELETE
‪const PAGE_DELETE
Definition: Permission.php:45
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$userHasAccessToModifyPagesAndToDefaultLanguage
‪bool $userHasAccessToModifyPagesAndToDefaultLanguage
Definition: TreeController.php:117
‪TYPO3\CMS\Core\Utility\GeneralUtility\intExplode
‪static int[] intExplode($delimiter, $string, $removeEmptyValues=false, $limit=0)
Definition: GeneralUtility.php:927
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$addIdAsPrefix
‪bool $addIdAsPrefix
Definition: TreeController.php:59
‪TYPO3\CMS\Core\Exception\Page\RootLineException
Definition: RootLineException.php:24
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$hiddenRecords
‪array $hiddenRecords
Definition: TreeController.php:83
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:42
‪TYPO3\CMS\Backend\Controller\Page\TreeController\getAllEntryPointPageTrees
‪array getAllEntryPointPageTrees(int $startPid=0, string $query='')
Definition: TreeController.php:492
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication\initializeWebmountsForElementBrowser
‪initializeWebmountsForElementBrowser()
Definition: BackendUserAuthentication.php:1046
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isInWebMount
‪int null isInWebMount($idOrRow, $readPerms='', $exitOnError=null)
Definition: BackendUserAuthentication.php:304
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:50
‪TYPO3\CMS\Backend\Controller\Page\TreeController\fetchReadOnlyConfigurationAction
‪fetchReadOnlyConfigurationAction(ServerRequestInterface $request)
Definition: TreeController.php:184
‪TYPO3\CMS\Backend\Controller\Page\TreeController\setTemporaryMountPointAction
‪ResponseInterface setTemporaryMountPointAction(ServerRequestInterface $request)
Definition: TreeController.php:314
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$showMountPathAboveMounts
‪bool $showMountPathAboveMounts
Definition: TreeController.php:71
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility\isLoaded
‪static bool isLoaded($key)
Definition: ExtensionManagementUtility.php:114
‪TYPO3\CMS\Core\Type\Bitmask\JsConfirmation
Definition: JsConfirmation.php:25
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$useNavTitle
‪bool $useNavTitle
Definition: TreeController.php:53
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication\jsConfirmation
‪bool jsConfirmation($bitmask)
Definition: BackendUserAuthentication.php:1071