‪TYPO3CMS  ‪main
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\EventDispatcher\EventDispatcherInterface;
21 use Psr\Http\Message\ResponseInterface;
22 use Psr\Http\Message\ServerRequestInterface;
29 use TYPO3\CMS\Backend\Utility\BackendUtility;
36 use TYPO3\CMS\Core\Imaging\IconSize;
42 
48 {
54  protected ‪$useNavTitle = false;
55 
61  protected ‪$addIdAsPrefix = false;
62 
68  protected ‪$addDomainName = false;
69 
75  protected ‪$showMountPathAboveMounts = false;
76 
82  protected ‪$hiddenRecords = [];
83 
90  protected ‪$backgroundColors = [];
91 
97  protected array ‪$labels = [];
98 
104  protected ‪$expandedState = [];
105 
111  protected ‪$iconFactory;
112 
118  protected ‪$levelsToFetch = 2;
119 
124  protected ‪$expandAllNodes = false;
125 
130  protected array ‪$alternativeEntryPoints = [];
131 
132  protected ‪UriBuilder ‪$uriBuilder;
133 
135 
137 
141  public function ‪__construct()
142  {
143  $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
144  $this->uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
145  }
146 
147  protected function ‪initializeConfiguration(ServerRequestInterface $request)
148  {
149  if ($request->getQueryParams()['readOnly'] ?? false) {
150  $this->‪getBackendUser()->initializeWebmountsForElementBrowser();
151  }
152  if ($request->getQueryParams()['alternativeEntryPoints'] ?? false) {
153  $this->alternativeEntryPoints = $request->getQueryParams()['alternativeEntryPoints'];
154  $this->alternativeEntryPoints = array_filter($this->alternativeEntryPoints, function (int $pageId): bool {
155  return $this->‪getBackendUser()->isInWebMount($pageId) !== null;
156  });
157  $this->alternativeEntryPoints = array_map(intval(...), $this->alternativeEntryPoints);
158  $this->alternativeEntryPoints = array_unique($this->alternativeEntryPoints);
159  }
160  $userTsConfig = $this->‪getBackendUser()->getTSConfig();
161  $this->hiddenRecords = ‪GeneralUtility::intExplode(
162  ',',
163  (string)($userTsConfig['options.']['hideRecords.']['pages'] ?? ''),
164  true
165  );
166  $this->backgroundColors = $userTsConfig['options.']['pageTree.']['backgroundColor.'] ?? [];
167  $this->labels = $userTsConfig['options.']['pageTree.']['label.'] ?? [];
168  $this->addIdAsPrefix = (bool)($userTsConfig['options.']['pageTree.']['showPageIdWithTitle'] ?? false);
169  $this->addDomainName = (bool)($userTsConfig['options.']['pageTree.']['showDomainNameWithTitle'] ?? false);
170  $this->useNavTitle = (bool)($userTsConfig['options.']['pageTree.']['showNavTitle'] ?? false);
171  $this->showMountPathAboveMounts = (bool)($userTsConfig['options.']['pageTree.']['showPathAboveMounts'] ?? false);
172  $this->userHasAccessToModifyPagesAndToDefaultLanguage = $this->‪getBackendUser()->check('tables_modify', 'pages') && $this->‪getBackendUser()->checkLanguageAccess(0);
173  }
174 
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 = (string)($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 
221  protected function ‪getDokTypes(): array
222  {
223  $backendUser = $this->‪getBackendUser();
224  $doktypeLabelMap = [];
225  foreach (‪$GLOBALS['TCA']['pages']['columns']['doktype']['config']['items'] as $doktypeItemConfig) {
226  $selectionItem = ‪SelectItem::fromTcaItemArray($doktypeItemConfig);
227  if ($selectionItem->isDivider()) {
228  continue;
229  }
230  $doktypeLabelMap[$selectionItem->getValue()] = $selectionItem->getLabel();
231  }
232  $doktypes = ‪GeneralUtility::intExplode(',', (string)($backendUser->getTSConfig()['options.']['pageTree.']['doktypesToShowInNewPageDragArea'] ?? ''), true);
233  $doktypes = array_unique($doktypes);
234  ‪$output = [];
235  $allowedDoktypes = ‪GeneralUtility::intExplode(',', (string)($backendUser->groupData['pagetypes_select'] ?? ''), true);
236  $isAdmin = $backendUser->isAdmin();
237  // Early return if backend user may not create any doktype
238  if (!$isAdmin && empty($allowedDoktypes)) {
239  return ‪$output;
240  }
241  foreach ($doktypes as $doktype) {
242  if (!isset($doktypeLabelMap[$doktype]) || (!$isAdmin && !in_array($doktype, $allowedDoktypes, true))) {
243  continue;
244  }
245  $label = htmlspecialchars($this->‪getLanguageService()->sL($doktypeLabelMap[$doktype]));
246  ‪$output[] = [
247  'nodeType' => $doktype,
248  'icon' => ‪$GLOBALS['TCA']['pages']['ctrl']['typeicon_classes'][$doktype] ?? '',
249  'title' => $label,
250  ];
251  }
252  return ‪$output;
253  }
254 
258  public function ‪fetchDataAction(ServerRequestInterface $request): ResponseInterface
259  {
260  $this->‪initializeConfiguration($request);
261 
262  $items = [];
263  $parentIdentifier = $request->getQueryParams()['parent'] ?? null;
264  if ($parentIdentifier) {
265  $parentDepth = (int)($request->getQueryParams()['depth'] ?? 0);
266  // Fetching a part of a page tree
267  $entryPoints = $this->‪getAllEntryPointPageTrees((int)$parentIdentifier);
268  $mountPid = (int)($request->getQueryParams()['mount'] ?? 0);
269  $this->levelsToFetch = $parentDepth + ‪$this->levelsToFetch;
270  foreach ($entryPoints as $page) {
271  $items[] = $this->‪pagesToFlatArray($page, $mountPid, $parentDepth);
272  }
273  } else {
274  $entryPoints = $this->‪getAllEntryPointPageTrees();
275  foreach ($entryPoints as $page) {
276  $items[] = $this->‪pagesToFlatArray($page, (int)$page['uid']);
277  }
278  }
279  $items = array_merge(...$items);
280 
281  return new ‪JsonResponse($this->‪getPostProcessedPageItems($request, $items));
282  }
283 
287  public function ‪filterDataAction(ServerRequestInterface $request): ResponseInterface
288  {
289  $searchQuery = $request->getQueryParams()['q'] ?? '';
290  if (trim($searchQuery) === '') {
291  return new JsonResponse([]);
292  }
293 
294  $this->‪initializeConfiguration($request);
295  $this->expandAllNodes = true;
296 
297  $items = [];
298  $entryPoints = $this->‪getAllEntryPointPageTrees(0, $searchQuery);
299 
300  foreach ($entryPoints as $page) {
301  if (!empty($page)) {
302  $items[] = $this->‪pagesToFlatArray($page, (int)$page['uid']);
303  }
304  }
305  $items = array_merge(...$items);
306 
307  return new ‪JsonResponse($this->‪getPostProcessedPageItems($request, $items));
308  }
309 
315  public function ‪setTemporaryMountPointAction(ServerRequestInterface $request): ResponseInterface
316  {
317  if (empty($request->getParsedBody()['pid'])) {
318  throw new \RuntimeException(
319  'Required "pid" parameter is missing.',
320  1511792197
321  );
322  }
323  $pid = (int)$request->getParsedBody()['pid'];
324 
325  $this->‪getBackendUser()->uc['pageTree_temporaryMountPoint'] = $pid;
326  $this->‪getBackendUser()->writeUC();
327  $response = [
328  'mountPointPath' => $this->‪getMountPointPath($pid),
329  ];
330  return new ‪JsonResponse($response);
331  }
332 
343  protected function ‪pagesToFlatArray(array $page, int $entryPoint, int $depth = 0): array
344  {
345  $backendUser = $this->‪getBackendUser();
346  $pageId = (int)$page['uid'];
347  if (in_array($pageId, $this->hiddenRecords, true)) {
348  return [];
349  }
350 
351  $stopPageTree = !empty($page['php_tree_stop']) && $depth > 0;
352  ‪$identifier = $entryPoint . '_' . $pageId;
353  $expanded = !empty($page['expanded'])
354  || (isset($this->expandedState[‪$identifier]) && $this->expandedState[‪$identifier])
355  || $this->expandAllNodes;
356 
357  $suffix = '';
358  $prefix = '';
359  $nameSourceField = 'title';
360  $visibleText = $page['title'];
361  $tooltip = BackendUtility::titleAttribForPages($page, '', false, $this->useNavTitle);
362  if ($pageId !== 0) {
363  $icon = $this->iconFactory->getIconForRecord('pages', $page, IconSize::SMALL);
364  } else {
365  $icon = $this->iconFactory->getIcon('apps-pagetree-root', IconSize::SMALL);
366  }
367 
368  if ($this->useNavTitle && trim($page['nav_title'] ?? '') !== '') {
369  $nameSourceField = 'nav_title';
370  $visibleText = $page['nav_title'];
371  }
372  if (trim($visibleText) === '') {
373  $visibleText = htmlspecialchars('[' . $this->‪getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.no_title') . ']');
374  }
375 
376  if ($this->addDomainName && ($page['is_siteroot'] ?? false)) {
377  $domain = $this->‪getDomainNameForPage($pageId);
378  $suffix = $domain !== '' ? ' [' . $domain . ']' : '';
379  }
380 
381  $lockInfo = BackendUtility::isRecordLocked('pages', $pageId);
382  if (is_array($lockInfo)) {
383  $tooltip .= ' - ' . $lockInfo['msg'];
384  }
385  if ($this->addIdAsPrefix) {
386  $prefix = '[' . $pageId . '] ';
387  }
388 
389  ‪$labels = [];
390  if (!empty($this->backgroundColors[$pageId])) {
391  ‪$labels[] = new Label(
392  label: $this->‪getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.color') . ': ' . $this->backgroundColors[$pageId],
393  color: $this->backgroundColors[$pageId] ?? '#ff0000',
394  priority: -1,
395  );
396  }
397  if (!empty($this->labels[$pageId . '.']) && isset($this->labels[$pageId . '.']['label']) && trim($this->labels[$pageId . '.']['label']) !== '') {
398  ‪$labels[] = new Label(
399  label: (string)($this->labels[$pageId . '.']['label']),
400  color: (string)($this->labels[$pageId . '.']['color'] ?? '#ff8700'),
401  );
402  }
403 
404  $editable = false;
405  if ($pageId !== 0) {
406  $editable = $this->userHasAccessToModifyPagesAndToDefaultLanguage && $backendUser->doesUserHaveAccess($page, ‪Permission::PAGE_EDIT);
407  }
408 
409  $items = [];
410  $item = [
411  // identifier is not only used for pages, therefore it's a string
412  'identifier' => (string)$pageId,
413  'parentIdentifier' => (string)($page['pid'] ?? ''),
414  'recordType' => 'pages',
415  'name' => $visibleText,
416  'prefix' => !empty($prefix) ? htmlspecialchars($prefix) : '',
417  'suffix' => !empty($suffix) ? htmlspecialchars($suffix) : '',
418  'tooltip' => $tooltip,
419  'depth' => $depth,
420  'icon' => $icon->getIdentifier(),
421  'overlayIcon' => $icon->getOverlayIcon() ? $icon->getOverlayIcon()->getIdentifier() : '',
422  'expanded' => $expanded,
423  'editable' => $editable,
424  'deletable' => $backendUser->doesUserHaveAccess($page, Permission::PAGE_DELETE),
425  'labels' => ‪$labels,
426 
427  // _page is only for use in events so they do not need to fetch those
428  // records again. The property will be removed from the final payload.
429  '_page' => $page,
430  'doktype' => (int)($page['doktype'] ?? 0),
431  'nameSourceField' => $nameSourceField,
432  'mountPoint' => $entryPoint,
433  'workspaceId' => !empty($page['t3ver_oid']) ? $page['t3ver_oid'] : $pageId,
434  ];
435 
436  if (!empty($page['_children']) || $this->pageTreeRepository->hasChildren($pageId)) {
437  $item['hasChildren'] = true;
438  if ($depth >= $this->levelsToFetch) {
439  $page = $this->pageTreeRepository->getTreeLevels($page, 1);
440  }
441  }
442  if (is_array($lockInfo)) {
443  $item['locked'] = true;
444  }
445  if ($stopPageTree) {
446  $item['stopPageTree'] = true;
447  }
448  if ($depth === 0) {
449  if ($this->showMountPathAboveMounts) {
450  $item['note'] = $this->‪getMountPointPath($pageId);
451  }
452  }
453 
454  $items[] = $item;
455  if (!$stopPageTree && is_array($page['_children']) && !empty($page['_children']) && ($depth < $this->levelsToFetch || $expanded)) {
456  $items[key($items)]['loaded'] = true;
457  foreach ($page['_children'] as $child) {
458  $items = array_merge($items, $this->‪pagesToFlatArray($child, $entryPoint, $depth + 1));
459  }
460  }
461 
462  return $items;
463  }
464 
465  protected function ‪initializePageTreeRepository(): PageTreeRepository
466  {
467  $backendUser = $this->‪getBackendUser();
468  $userTsConfig = $backendUser->getTSConfig();
469  $excludedDocumentTypes = ‪GeneralUtility::intExplode(',', (string)($userTsConfig['options.']['pageTree.']['excludeDoktypes'] ?? ''), true);
470 
471  $additionalQueryRestrictions = [];
472  if ($excludedDocumentTypes !== []) {
473  $additionalQueryRestrictions[] = GeneralUtility::makeInstance(DocumentTypeExclusionRestriction::class, $excludedDocumentTypes);
474  }
475 
476  ‪$pageTreeRepository = GeneralUtility::makeInstance(
477  PageTreeRepository::class,
478  $backendUser->workspace,
479  [],
480  $additionalQueryRestrictions
481  );
483  return ‪$pageTreeRepository;
484  }
485 
491  protected function ‪getAllEntryPointPageTrees(int $startPid = 0, string $query = ''): array
492  {
493  $this->pageTreeRepository ??= $this->‪initializePageTreeRepository();
494  $backendUser = $this->‪getBackendUser();
495  if ($startPid === 0) {
496  $startPid = (int)($backendUser->uc['pageTree_temporaryMountPoint'] ?? 0);
497  }
498 
499  $entryPointIds = null;
500  if ($startPid > 0) {
501  $entryPointIds = [$startPid];
502  } elseif (!empty($this->alternativeEntryPoints)) {
503  $entryPointIds = ‪$this->alternativeEntryPoints;
504  }
505 
506  $permClause = $backendUser->getPagePermsClause(‪Permission::PAGE_SHOW);
507  if ($query !== '') {
508  $this->levelsToFetch = 999;
509  $this->pageTreeRepository->fetchFilteredTree(
510  $query,
511  $this->‪getAllowedMountPoints(),
512  $permClause
513  );
514  }
515  $rootRecord = [
516  'uid' => 0,
517  'title' => ‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] ?: 'TYPO3',
518  ];
519  $entryPointRecords = [];
520  $mountPoints = [];
521  if ($entryPointIds === null) {
522  //watch out for deleted pages returned as webmount
523  $mountPoints = array_map(intval(...), $backendUser->returnWebmounts());
524  $mountPoints = array_unique($mountPoints);
525  $mountPoints = array_filter($mountPoints, fn(int $id): bool => !in_array($id, $this->hiddenRecords, true));
526 
527  // Switch to multiple-entryPoint-mode if the rootPage is to be mounted.
528  // (other mounts would appear duplicated in the pid = 0 tree otherwise)
529  if (in_array(0, $mountPoints, true)) {
530  $entryPointIds = $mountPoints;
531  }
532  }
533 
534  if ($entryPointIds === null) {
535  if ($query !== '') {
536  $rootRecord = $this->pageTreeRepository->getTree(0, null, $mountPoints);
537  } else {
538  $rootRecord = $this->pageTreeRepository->getTreeLevels($rootRecord, $this->levelsToFetch, $mountPoints);
539  }
540 
541  $mountPointOrdering = array_flip($mountPoints);
542  if (isset($rootRecord['_children'])) {
543  usort($rootRecord['_children'], static function ($a, $b) use ($mountPointOrdering) {
544  return ($mountPointOrdering[$a['uid']] ?? 0) <=> ($mountPointOrdering[$b['uid']] ?? 0);
545  });
546  }
547 
548  $entryPointRecords[] = $rootRecord;
549  } else {
550  $entryPointIds = array_filter($entryPointIds, fn(int $id): bool => !in_array($id, $this->hiddenRecords, true));
551  foreach ($entryPointIds as $k => $entryPointId) {
552  if ($entryPointId === 0) {
553  $entryPointRecord = $rootRecord;
554  } else {
555  $entryPointRecord = BackendUtility::getRecordWSOL('pages', $entryPointId, '*', $permClause);
556 
557  if ($entryPointRecord !== null && !$backendUser->isInWebMount($entryPointId)) {
558  $entryPointRecord = null;
559  }
560  if ($entryPointRecord === null) {
561  continue;
562  }
563  }
564 
565  $entryPointRecord['uid'] = (int)$entryPointRecord['uid'];
566  if ($query === '') {
567  $entryPointRecord = $this->pageTreeRepository->getTreeLevels($entryPointRecord, $this->levelsToFetch);
568  } else {
569  $entryPointRecord = $this->pageTreeRepository->getTree($entryPointRecord['uid'], null, $entryPointIds);
570  }
571 
572  if (is_array($entryPointRecord) && !empty($entryPointRecord)) {
573  $entryPointRecords[$k] = $entryPointRecord;
574  }
575  }
576  }
577 
578  return $entryPointRecords;
579  }
580 
584  protected function ‪getDomainNameForPage(int $pageId): string
585  {
586  $domain = '';
587  $siteFinder = GeneralUtility::makeInstance(SiteFinder::class);
588  try {
589  $site = $siteFinder->getSiteByRootPageId($pageId);
590  $domain = (string)$site->getBase();
592  // No site found
593  }
594 
595  return $domain;
596  }
597 
601  protected function ‪getMountPointPath(int ‪$uid): string
602  {
603  if (‪$uid <= 0) {
604  return '';
605  }
606  $rootline = array_reverse(BackendUtility::BEgetRootLine(‪$uid));
607  array_shift($rootline);
608  $path = [];
609  foreach ($rootline as $rootlineElement) {
610  ‪$record = BackendUtility::getRecordWSOL('pages', $rootlineElement['uid'], 'title, nav_title', '', true, true);
611  $text = ‪$record['title'];
612  if ($this->useNavTitle && trim(‪$record['nav_title'] ?? '') !== '') {
613  $text = ‪$record['nav_title'];
614  }
615  $path[] = htmlspecialchars($text);
616  }
617  return '/' . implode('/', $path);
618  }
619 
623  protected function ‪isDragMoveAllowed(): bool
624  {
625  $backendUser = $this->‪getBackendUser();
626  return $backendUser->isAdmin()
627  || ($backendUser->check('tables_modify', 'pages') && $backendUser->checkLanguageAccess(0));
628  }
629 
635  protected function ‪getAllowedMountPoints(): array
636  {
637  $mountPoints = (int)($this->‪getBackendUser()->uc['pageTree_temporaryMountPoint'] ?? 0);
638  if (!$mountPoints) {
639  if (!empty($this->alternativeEntryPoints)) {
641  }
642  $mountPoints = array_map(intval(...), $this->‪getBackendUser()->returnWebmounts());
643  return array_unique($mountPoints);
644  }
645  return [$mountPoints];
646  }
647 
648  protected function ‪getPostProcessedPageItems(ServerRequestInterface $request, array $items): array
649  {
650  return array_map(
651  static function (array $item): PageTreeItem {
652  return new PageTreeItem(
653  // TreeItem
654  new ‪TreeItem(
655  identifier: $item['identifier'],
656  parentIdentifier: (string)($item['parentIdentifier'] ?? ''),
657  recordType: (string)($item['recordType'] ?? ''),
658  name: (string)($item['name'] ?? ''),
659  note: (string)($item['note'] ?? ''),
660  ‪prefix: (string)($item['prefix'] ?? ''),
661  suffix: (string)($item['suffix'] ?? ''),
662  tooltip: (string)($item['tooltip'] ?? ''),
663  depth: (int)($item['depth'] ?? 0),
664  hasChildren: (bool)($item['hasChildren'] ?? false),
665  expanded: (bool)($item['expanded'] ?? false),
666  loaded: (bool)($item['loaded'] ?? false),
667  editable: (bool)($item['editable'] ?? false),
668  deletable: (bool)($item['deletable'] ?? false),
669  icon: (string)($item['icon'] ?? ''),
670  overlayIcon: (string)($item['overlayIcon'] ?? ''),
671  statusInformation: (array)($item['statusInformation'] ?? []),
672  labels: (array)($item['labels'] ?? []),
673  ),
674  // PageTreeItem
675  doktype: (int)($item['doktype'] ?? ''),
676  nameSourceField: (string)($item['nameSourceField'] ?? ''),
677  workspaceId: (int)($item['workspaceId'] ?? 0),
678  locked: (bool)($item['locked'] ?? false),
679  stopPageTree: (bool)($item['stopPageTree'] ?? false),
680  mountPoint: (int)($item['mountPoint'] ?? 0),
681  );
682  },
683  GeneralUtility::makeInstance(EventDispatcherInterface::class)->dispatch(
685  )->getItems()
686  );
687  }
688 
689  protected function ‪getBackendUser(): ‪BackendUserAuthentication
690  {
691  return ‪$GLOBALS['BE_USER'];
692  }
693 
694  protected function ‪getLanguageService(): ?‪LanguageService
695  {
696  return ‪$GLOBALS['LANG'] ?? null;
697  }
698 }
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$iconFactory
‪IconFactory $iconFactory
Definition: TreeController.php:103
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$pageTreeRepository
‪PageTreeRepository $pageTreeRepository
Definition: TreeController.php:124
‪TYPO3\CMS\Backend\Controller\Page\TreeController\getDomainNameForPage
‪getDomainNameForPage(int $pageId)
Definition: TreeController.php:574
‪TYPO3\CMS\Core\Database\Query\Restriction\DocumentTypeExclusionRestriction
Definition: DocumentTypeExclusionRestriction.php:27
‪TYPO3\CMS\Backend\Controller\Page\TreeController\getAllowedMountPoints
‪int[] getAllowedMountPoints()
Definition: TreeController.php:625
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$uriBuilder
‪UriBuilder $uriBuilder
Definition: TreeController.php:122
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$addDomainName
‪bool $addDomainName
Definition: TreeController.php:65
‪TYPO3\CMS\Backend\Controller\Event\AfterPageTreeItemsPreparedEvent
Definition: AfterPageTreeItemsPreparedEvent.php:26
‪TYPO3\CMS\Backend\Controller\Page\TreeController\fetchConfigurationAction
‪fetchConfigurationAction()
Definition: TreeController.php:168
‪TYPO3\CMS\Backend\Controller\Page\TreeController\getMountPointPath
‪getMountPointPath(int $uid)
Definition: TreeController.php:591
‪TYPO3\CMS\Backend\Controller\Page\TreeController\initializeConfiguration
‪initializeConfiguration(ServerRequestInterface $request)
Definition: TreeController.php:137
‪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:97
‪TYPO3\CMS\Backend\Controller\Page\TreeController\setTemporaryMountPointAction
‪setTemporaryMountPointAction(ServerRequestInterface $request)
Definition: TreeController.php:305
‪TYPO3\CMS\Core\Authentication\JsConfirmation
Definition: JsConfirmation.php:28
‪TYPO3\CMS\Core\Imaging\IconFactory
Definition: IconFactory.php:34
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$labels
‪array $labels
Definition: TreeController.php:91
‪TYPO3\CMS\Backend\Controller\Page
Definition: LocalizationController.php:18
‪TYPO3\CMS\Backend\Controller\Page\TreeController\filterDataAction
‪filterDataAction(ServerRequestInterface $request)
Definition: TreeController.php:277
‪TYPO3\CMS\Backend\Controller\Page\TreeController\fetchDataAction
‪fetchDataAction(ServerRequestInterface $request)
Definition: TreeController.php:248
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$levelsToFetch
‪int $levelsToFetch
Definition: TreeController.php:109
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$alternativeEntryPoints
‪array $alternativeEntryPoints
Definition: TreeController.php:120
‪TYPO3\CMS\Core\Type\Bitmask\Permission
Definition: Permission.php:26
‪TYPO3\CMS\Backend\Dto\Tree\Label\Label
Definition: Label.php:21
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$backgroundColors
‪array $backgroundColors
Definition: TreeController.php:84
‪TYPO3\CMS\Backend\Controller\Page\TreeController\getDokTypes
‪getDokTypes()
Definition: TreeController.php:211
‪TYPO3\CMS\Core\Schema\Struct\SelectItem
Definition: SelectItem.php:21
‪TYPO3\CMS\Core\Schema\Struct\SelectItem\fromTcaItemArray
‪static fromTcaItemArray(array $item, string $type='select')
Definition: SelectItem.php:45
‪TYPO3\CMS\Backend\Routing\UriBuilder
Definition: UriBuilder.php:44
‪TYPO3\CMS\Backend\Controller\Page\TreeController\initializePageTreeRepository
‪initializePageTreeRepository()
Definition: TreeController.php:455
‪TYPO3\CMS\Webhooks\Message\$record
‪identifier readonly int readonly array $record
Definition: PageModificationMessage.php:36
‪TYPO3\CMS\Backend\Controller\Page\TreeController\getPostProcessedPageItems
‪getPostProcessedPageItems(ServerRequestInterface $request, array $items)
Definition: TreeController.php:638
‪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\Backend\Controller\Page\TreeController\getAllEntryPointPageTrees
‪getAllEntryPointPageTrees(int $startPid=0, string $query='')
Definition: TreeController.php:481
‪TYPO3\CMS\Core\Authentication\JsConfirmation\DELETE
‪const DELETE
Definition: JsConfirmation.php:31
‪$output
‪$output
Definition: annotationChecker.php:114
‪TYPO3\CMS\Backend\Controller\Page\TreeController\__construct
‪__construct()
Definition: TreeController.php:131
‪TYPO3\CMS\Backend\Controller\Page\TreeController\getBackendUser
‪getBackendUser()
Definition: TreeController.php:679
‪TYPO3\CMS\Backend\Controller\Page\TreeController\pagesToFlatArray
‪pagesToFlatArray(array $page, int $entryPoint, int $depth=0)
Definition: TreeController.php:333
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$expandAllNodes
‪bool $expandAllNodes
Definition: TreeController.php:114
‪TYPO3\CMS\Webhooks\Message\$uid
‪identifier readonly int $uid
Definition: PageModificationMessage.php:35
‪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:126
‪TYPO3\CMS\Backend\Controller\Page\TreeController\isDragMoveAllowed
‪isDragMoveAllowed()
Definition: TreeController.php:613
‪TYPO3\CMS\Backend\Controller\Page\TreeController\getLanguageService
‪getLanguageService()
Definition: TreeController.php:684
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$addIdAsPrefix
‪bool $addIdAsPrefix
Definition: TreeController.php:59
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$hiddenRecords
‪array $hiddenRecords
Definition: TreeController.php:77
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:46
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52
‪TYPO3\CMS\Backend\Controller\Page\TreeController\fetchReadOnlyConfigurationAction
‪fetchReadOnlyConfigurationAction(ServerRequestInterface $request)
Definition: TreeController.php:184
‪TYPO3\CMS\Backend\Dto\Tree\TreeItem
Definition: TreeItem.php:27
‪TYPO3\CMS\Extbase\Security\prefix
‪@ prefix
Definition: HashScope.php:30
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$showMountPathAboveMounts
‪bool $showMountPathAboveMounts
Definition: TreeController.php:71
‪TYPO3\CMS\Core\Utility\GeneralUtility\intExplode
‪static list< int > intExplode(string $delimiter, string $string, bool $removeEmptyValues=false)
Definition: GeneralUtility.php:756
‪TYPO3\CMS\Backend\Dto\Tree\PageTreeItem
Definition: PageTreeItem.php:24
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$useNavTitle
‪bool $useNavTitle
Definition: TreeController.php:53
‪TYPO3\CMS\Webhooks\Message\$identifier
‪identifier readonly string $identifier
Definition: FileAddedMessage.php:37
‪TYPO3\CMS\Backend\Tree\Repository\PageTreeRepository\setAdditionalWhereClause
‪setAdditionalWhereClause(string $additionalWhereClause)
Definition: PageTreeRepository.php:119