‪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;
27 use TYPO3\CMS\Backend\Utility\BackendUtility;
35 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 ‪$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 
127 
129 
133  public function ‪__construct()
134  {
135  $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
136  $this->uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
137  }
138 
139  protected function ‪initializeConfiguration(ServerRequestInterface $request)
140  {
141  if ($request->getQueryParams()['readOnly'] ?? false) {
142  $this->‪getBackendUser()->initializeWebmountsForElementBrowser();
143  }
144  if ($request->getQueryParams()['alternativeEntryPoints'] ?? false) {
145  $this->alternativeEntryPoints = $request->getQueryParams()['alternativeEntryPoints'];
146  $this->alternativeEntryPoints = array_filter($this->alternativeEntryPoints, function (int $pageId): bool {
147  return $this->‪getBackendUser()->isInWebMount($pageId) !== null;
148  });
149  $this->alternativeEntryPoints = array_map(intval(...), $this->alternativeEntryPoints);
150  $this->alternativeEntryPoints = array_unique($this->alternativeEntryPoints);
151  }
152  $userTsConfig = $this->‪getBackendUser()->getTSConfig();
153  $this->hiddenRecords = GeneralUtility::intExplode(
154  ',',
155  (string)($userTsConfig['options.']['hideRecords.']['pages'] ?? ''),
156  true
157  );
158  $this->backgroundColors = $userTsConfig['options.']['pageTree.']['backgroundColor.'] ?? [];
159  $this->addIdAsPrefix = (bool)($userTsConfig['options.']['pageTree.']['showPageIdWithTitle'] ?? false);
160  $this->addDomainName = (bool)($userTsConfig['options.']['pageTree.']['showDomainNameWithTitle'] ?? false);
161  $this->useNavTitle = (bool)($userTsConfig['options.']['pageTree.']['showNavTitle'] ?? false);
162  $this->showMountPathAboveMounts = (bool)($userTsConfig['options.']['pageTree.']['showPathAboveMounts'] ?? false);
163  $backendUserConfiguration = GeneralUtility::makeInstance(BackendUserConfiguration::class);
164  $backendUserPageTreeState = $backendUserConfiguration->get('BackendComponents.States.Pagetree');
165  if (is_object($backendUserPageTreeState) && is_object($backendUserPageTreeState->stateHash)) {
166  $this->expandedState = (array)$backendUserPageTreeState->stateHash;
167  } else {
168  $stateHash = $backendUserPageTreeState['stateHash'] ?? [];
169  $this->expandedState = is_array($stateHash) ? $stateHash : [];
170  }
171  $this->userHasAccessToModifyPagesAndToDefaultLanguage = $this->‪getBackendUser()->check('tables_modify', 'pages') && $this->‪getBackendUser()->checkLanguageAccess(0);
172  }
173 
177  public function ‪fetchConfigurationAction(): ResponseInterface
178  {
179  $configuration = [
180  'allowDragMove' => $this->‪isDragMoveAllowed(),
181  'doktypes' => $this->‪getDokTypes(),
182  'displayDeleteConfirmation' => $this->‪getBackendUser()->jsConfirmation(‪JsConfirmation::DELETE),
183  'temporaryMountPoint' => $this->‪getMountPointPath((int)($this->‪getBackendUser()->uc['pageTree_temporaryMountPoint'] ?? 0)),
184  'showIcons' => true,
185  'dataUrl' => (string)$this->uriBuilder->buildUriFromRoute('ajax_page_tree_data'),
186  'filterUrl' => (string)$this->uriBuilder->buildUriFromRoute('ajax_page_tree_filter'),
187  'setTemporaryMountPointUrl' => (string)$this->uriBuilder->buildUriFromRoute('ajax_page_tree_set_temporary_mount_point'),
188  ];
189 
190  return new ‪JsonResponse($configuration);
191  }
192 
193  public function ‪fetchReadOnlyConfigurationAction(ServerRequestInterface $request): ResponseInterface
194  {
195  $entryPoints = (string)($request->getQueryParams()['alternativeEntryPoints'] ?? '');
196  $entryPoints = GeneralUtility::intExplode(',', $entryPoints, true);
197  $additionalArguments = [
198  'readOnly' => 1,
199  ];
200  if (!empty($entryPoints)) {
201  $additionalArguments['alternativeEntryPoints'] = $entryPoints;
202  }
203  $configuration = [
204  'displayDeleteConfirmation' => $this->‪getBackendUser()->jsConfirmation(‪JsConfirmation::DELETE),
205  'temporaryMountPoint' => $this->‪getMountPointPath((int)($this->‪getBackendUser()->uc['pageTree_temporaryMountPoint'] ?? 0)),
206  'showIcons' => true,
207  'dataUrl' => (string)$this->uriBuilder->buildUriFromRoute('ajax_page_tree_data', $additionalArguments),
208  'filterUrl' => (string)$this->uriBuilder->buildUriFromRoute('ajax_page_tree_filter', $additionalArguments),
209  'setTemporaryMountPointUrl' => (string)$this->uriBuilder->buildUriFromRoute('ajax_page_tree_set_temporary_mount_point'),
210  ];
211  return new ‪JsonResponse($configuration);
212  }
213 
220  protected function ‪getDokTypes(): array
221  {
222  $backendUser = $this->‪getBackendUser();
223  $doktypeLabelMap = [];
224  foreach (‪$GLOBALS['TCA']['pages']['columns']['doktype']['config']['items'] as $doktypeItemConfig) {
225  $selectionItem = ‪SelectItem::fromTcaItemArray($doktypeItemConfig);
226  if ($selectionItem->isDivider()) {
227  continue;
228  }
229  $doktypeLabelMap[$selectionItem->getValue()] = $selectionItem->getLabel();
230  }
231  $doktypes = GeneralUtility::intExplode(',', (string)($backendUser->getTSConfig()['options.']['pageTree.']['doktypesToShowInNewPageDragArea'] ?? ''), true);
232  $doktypes = array_unique($doktypes);
233  ‪$output = [];
234  $allowedDoktypes = GeneralUtility::intExplode(',', (string)($backendUser->groupData['pagetypes_select'] ?? ''), true);
235  $isAdmin = $backendUser->isAdmin();
236  // Early return if backend user may not create any doktype
237  if (!$isAdmin && empty($allowedDoktypes)) {
238  return ‪$output;
239  }
240  foreach ($doktypes as $doktype) {
241  if (!isset($doktypeLabelMap[$doktype]) || (!$isAdmin && !in_array($doktype, $allowedDoktypes, true))) {
242  continue;
243  }
244  $label = htmlspecialchars($this->‪getLanguageService()->sL($doktypeLabelMap[$doktype]));
245  ‪$output[] = [
246  'nodeType' => $doktype,
247  'icon' => ‪$GLOBALS['TCA']['pages']['ctrl']['typeicon_classes'][$doktype] ?? '',
248  'title' => $label,
249  ];
250  }
251  return ‪$output;
252  }
253 
257  public function ‪fetchDataAction(ServerRequestInterface $request): ResponseInterface
258  {
259  $this->‪initializeConfiguration($request);
260 
261  $items = [];
262  if (!empty($request->getQueryParams()['pid'])) {
263  // Fetching a part of a page tree
264  $entryPoints = $this->‪getAllEntryPointPageTrees((int)$request->getQueryParams()['pid']);
265  $mountPid = (int)($request->getQueryParams()['mount'] ?? 0);
266  $parentDepth = (int)($request->getQueryParams()['pidDepth'] ?? 0);
267  $this->levelsToFetch = $parentDepth + ‪$this->levelsToFetch;
268  foreach ($entryPoints as $page) {
269  $items[] = $this->‪pagesToFlatArray($page, $mountPid, $parentDepth);
270  }
271  } else {
272  $entryPoints = $this->‪getAllEntryPointPageTrees();
273  foreach ($entryPoints as $page) {
274  $items[] = $this->‪pagesToFlatArray($page, (int)$page['uid']);
275  }
276  }
277  $items = array_merge(...$items);
278 
279  return new ‪JsonResponse($this->‪getPostProcessedPageItems($request, $items));
280  }
281 
285  public function ‪filterDataAction(ServerRequestInterface $request): ResponseInterface
286  {
287  $searchQuery = $request->getQueryParams()['q'] ?? '';
288  if (trim($searchQuery) === '') {
289  return new JsonResponse([]);
290  }
291 
292  $this->‪initializeConfiguration($request);
293  $this->expandAllNodes = true;
294 
295  $items = [];
296  $entryPoints = $this->‪getAllEntryPointPageTrees(0, $searchQuery);
297 
298  foreach ($entryPoints as $page) {
299  if (!empty($page)) {
300  $items[] = $this->‪pagesToFlatArray($page, (int)$page['uid']);
301  }
302  }
303  $items = array_merge(...$items);
304 
305  return new ‪JsonResponse($this->‪getPostProcessedPageItems($request, $items));
306  }
307 
313  public function ‪setTemporaryMountPointAction(ServerRequestInterface $request): ResponseInterface
314  {
315  if (empty($request->getParsedBody()['pid'])) {
316  throw new \RuntimeException(
317  'Required "pid" parameter is missing.',
318  1511792197
319  );
320  }
321  $pid = (int)$request->getParsedBody()['pid'];
322 
323  $this->‪getBackendUser()->uc['pageTree_temporaryMountPoint'] = $pid;
324  $this->‪getBackendUser()->writeUC();
325  $response = [
326  'mountPointPath' => $this->‪getMountPointPath($pid),
327  ];
328  return new ‪JsonResponse($response);
329  }
330 
342  protected function ‪pagesToFlatArray(array $page, int $entryPoint, int $depth = 0, array $inheritedData = []): array
343  {
344  $backendUser = $this->‪getBackendUser();
345  $pageId = (int)$page['uid'];
346  if (in_array($pageId, $this->hiddenRecords, true)) {
347  return [];
348  }
349 
350  $stopPageTree = !empty($page['php_tree_stop']) && $depth > 0;
351  ‪$identifier = $entryPoint . '_' . $pageId;
352  $expanded = !empty($page['expanded'])
353  || (isset($this->expandedState[‪$identifier]) && $this->expandedState[‪$identifier])
354  || $this->expandAllNodes;
355 
356  $backgroundColor = !empty($this->backgroundColors[$pageId]) ? $this->backgroundColors[$pageId] : ($inheritedData['backgroundColor'] ?? '');
357 
358  $suffix = '';
359  $prefix = '';
360  $nameSourceField = 'title';
361  $visibleText = $page['title'];
362  $tooltip = BackendUtility::titleAttribForPages($page, '', false);
363  if ($pageId !== 0) {
364  $icon = $this->iconFactory->getIconForRecord('pages', $page, IconSize::SMALL);
365  } else {
366  $icon = $this->iconFactory->getIcon('apps-pagetree-root', IconSize::SMALL);
367  }
368 
369  if ($this->useNavTitle && trim($page['nav_title'] ?? '') !== '') {
370  $nameSourceField = 'nav_title';
371  $visibleText = $page['nav_title'];
372  }
373  if (trim($visibleText) === '') {
374  $visibleText = htmlspecialchars('[' . $this->‪getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.no_title') . ']');
375  }
376 
377  if ($this->addDomainName && ($page['is_siteroot'] ?? false)) {
378  $domain = $this->‪getDomainNameForPage($pageId);
379  $suffix = $domain !== '' ? ' [' . $domain . ']' : '';
380  }
381 
382  $lockInfo = BackendUtility::isRecordLocked('pages', $pageId);
383  if (is_array($lockInfo)) {
384  $tooltip .= ' - ' . $lockInfo['msg'];
385  }
386  if ($this->addIdAsPrefix) {
387  $prefix = htmlspecialchars('[' . $pageId . '] ');
388  }
389 
390  $items = [];
391  $item = [
392  // Used to track if the tree item is collapsed or not
393  'stateIdentifier' => ‪$identifier,
394  // identifier is not only used for pages, therefore it's a string
395  'identifier' => (string)$pageId,
396  // _page is only for use in events so they do not need to fetch those
397  // records again. The property will be removed from the final payload.
398  '_page' => $page,
399  'depth' => $depth,
400  // fine in JSON - if used in HTML directly, e.g. quotes can be used for XSS
401  'tip' => strip_tags(htmlspecialchars_decode($tooltip)),
402  'icon' => $icon->getIdentifier(),
403  'name' => $visibleText,
404  'type' => (int)($page['doktype'] ?? 0),
405  'nameSourceField' => $nameSourceField,
406  'mountPoint' => $entryPoint,
407  'workspaceId' => !empty($page['t3ver_oid']) ? $page['t3ver_oid'] : $pageId,
408  'siblingsCount' => $page['siblingsCount'] ?? 1,
409  'siblingsPosition' => $page['siblingsPosition'] ?? 1,
410  'allowDelete' => $backendUser->doesUserHaveAccess($page, ‪Permission::PAGE_DELETE),
411  'allowEdit' => $this->userHasAccessToModifyPagesAndToDefaultLanguage && $backendUser->doesUserHaveAccess($page, ‪Permission::PAGE_EDIT),
412  ];
413 
414  if (!empty($page['_children']) || $this->pageTreeRepository->hasChildren($pageId)) {
415  $item['hasChildren'] = true;
416  if ($depth >= $this->levelsToFetch) {
417  $page = $this->pageTreeRepository->getTreeLevels($page, 1);
418  }
419  }
420  if (!empty($prefix)) {
421  $item['prefix'] = htmlspecialchars($prefix);
422  }
423  if (!empty($suffix)) {
424  $item['suffix'] = htmlspecialchars($suffix);
425  }
426  if (is_array($lockInfo)) {
427  $item['locked'] = true;
428  }
429  if ($icon->getOverlayIcon()) {
430  $item['overlayIcon'] = $icon->getOverlayIcon()->getIdentifier();
431  }
432  if ($expanded && is_array($page['_children']) && !empty($page['_children'])) {
433  $item['expanded'] = true;
434  }
435  if ($backgroundColor) {
436  $item['backgroundColor'] = htmlspecialchars($backgroundColor);
437  }
438  if ($stopPageTree) {
439  $item['stopPageTree'] = true;
440  }
441  if ($depth === 0) {
442  $item['isMountPoint'] = true;
443 
444  if ($this->showMountPathAboveMounts) {
445  $item['readableRootline'] = $this->‪getMountPointPath($pageId);
446  }
447  }
448 
449  $items[] = $item;
450  if (!$stopPageTree && is_array($page['_children']) && !empty($page['_children']) && ($depth < $this->levelsToFetch || $expanded)) {
451  $siblingsCount = count($page['_children']);
452  $siblingsPosition = 0;
453  $items[key($items)]['loaded'] = true;
454  foreach ($page['_children'] as $child) {
455  $child['siblingsCount'] = $siblingsCount;
456  $child['siblingsPosition'] = ++$siblingsPosition;
457  $items = array_merge($items, $this->‪pagesToFlatArray($child, $entryPoint, $depth + 1, ['backgroundColor' => $backgroundColor]));
458  }
459  }
460  return $items;
461  }
462 
463  protected function ‪initializePageTreeRepository(): PageTreeRepository
464  {
465  $backendUser = $this->‪getBackendUser();
466  $userTsConfig = $backendUser->getTSConfig();
467  $excludedDocumentTypes = GeneralUtility::intExplode(',', (string)($userTsConfig['options.']['pageTree.']['excludeDoktypes'] ?? ''), true);
468 
469  $additionalQueryRestrictions = [];
470  if ($excludedDocumentTypes !== []) {
471  $additionalQueryRestrictions[] = GeneralUtility::makeInstance(DocumentTypeExclusionRestriction::class, $excludedDocumentTypes);
472  }
473 
474  ‪$pageTreeRepository = GeneralUtility::makeInstance(
475  PageTreeRepository::class,
476  $backendUser->workspace,
477  [],
478  $additionalQueryRestrictions
479  );
481  return ‪$pageTreeRepository;
482  }
483 
489  protected function ‪getAllEntryPointPageTrees(int $startPid = 0, string $query = ''): array
490  {
491  $this->pageTreeRepository ??= $this->‪initializePageTreeRepository();
492  $backendUser = $this->‪getBackendUser();
493  if ($startPid === 0) {
494  $startPid = (int)($backendUser->uc['pageTree_temporaryMountPoint'] ?? 0);
495  }
496 
497  $entryPointIds = null;
498  if ($startPid > 0) {
499  $entryPointIds = [$startPid];
500  } elseif (!empty($this->alternativeEntryPoints)) {
501  $entryPointIds = ‪$this->alternativeEntryPoints;
502  }
503 
504  $permClause = $backendUser->getPagePermsClause(‪Permission::PAGE_SHOW);
505  if ($query !== '') {
506  $this->levelsToFetch = 999;
507  $this->pageTreeRepository->fetchFilteredTree(
508  $query,
509  $this->‪getAllowedMountPoints(),
510  $permClause
511  );
512  }
513  $rootRecord = [
514  'uid' => 0,
515  'title' => ‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] ?: 'TYPO3',
516  ];
517  $entryPointRecords = [];
518  $mountPoints = [];
519  if ($entryPointIds === null) {
520  //watch out for deleted pages returned as webmount
521  $mountPoints = array_map(intval(...), $backendUser->returnWebmounts());
522  $mountPoints = array_unique($mountPoints);
523  $mountPoints = array_filter($mountPoints, fn(int $id): bool => !in_array($id, $this->hiddenRecords, true));
524 
525  // Switch to multiple-entryPoint-mode if the rootPage is to be mounted.
526  // (other mounts would appear duplicated in the pid = 0 tree otherwise)
527  if (in_array(0, $mountPoints, true)) {
528  $entryPointIds = $mountPoints;
529  }
530  }
531 
532  if ($entryPointIds === null) {
533  if ($query !== '') {
534  $rootRecord = $this->pageTreeRepository->getTree(0, null, $mountPoints);
535  } else {
536  $rootRecord = $this->pageTreeRepository->getTreeLevels($rootRecord, $this->levelsToFetch, $mountPoints);
537  }
538 
539  $mountPointOrdering = array_flip($mountPoints);
540  if (isset($rootRecord['_children'])) {
541  usort($rootRecord['_children'], static function ($a, $b) use ($mountPointOrdering) {
542  return ($mountPointOrdering[$a['uid']] ?? 0) <=> ($mountPointOrdering[$b['uid']] ?? 0);
543  });
544  }
545 
546  $entryPointRecords[] = $rootRecord;
547  } else {
548  $entryPointIds = array_filter($entryPointIds, fn(int $id): bool => !in_array($id, $this->hiddenRecords, true));
549  $this->‪calculateBackgroundColors($entryPointIds);
550  foreach ($entryPointIds as $k => $entryPointId) {
551  if ($entryPointId === 0) {
552  $entryPointRecord = $rootRecord;
553  } else {
554  $entryPointRecord = BackendUtility::getRecordWSOL('pages', $entryPointId, '*', $permClause);
555 
556  if ($entryPointRecord !== null && !$backendUser->isInWebMount($entryPointId)) {
557  $entryPointRecord = null;
558  }
559  if ($entryPointRecord === null) {
560  continue;
561  }
562  }
563 
564  $entryPointRecord['uid'] = (int)$entryPointRecord['uid'];
565  if ($query === '') {
566  $entryPointRecord = $this->pageTreeRepository->getTreeLevels($entryPointRecord, $this->levelsToFetch);
567  } else {
568  $entryPointRecord = $this->pageTreeRepository->getTree($entryPointRecord['uid'], null, $entryPointIds);
569  }
570 
571  if (is_array($entryPointRecord) && !empty($entryPointRecord)) {
572  $entryPointRecords[$k] = $entryPointRecord;
573  }
574  }
575  }
576 
577  return $entryPointRecords;
578  }
579 
580  protected function ‪calculateBackgroundColors(array $pageIds)
581  {
582  foreach ($pageIds as $pageId) {
583  if (!empty($this->backgroundColors) && is_array($this->backgroundColors)) {
584  try {
585  $entryPointRootLine = GeneralUtility::makeInstance(RootlineUtility::class, $pageId)->get();
586  } catch (RootLineException $e) {
587  $entryPointRootLine = [];
588  }
589  foreach ($entryPointRootLine as $rootLineEntry) {
590  $parentUid = $rootLineEntry['uid'];
591  if (!empty($this->backgroundColors[$parentUid]) && empty($this->backgroundColors[$pageId])) {
592  $this->backgroundColors[$pageId] = $this->backgroundColors[$parentUid];
593  }
594  }
595  }
596  }
597  }
598 
602  protected function ‪getDomainNameForPage(int $pageId): string
603  {
604  $domain = '';
605  $siteFinder = GeneralUtility::makeInstance(SiteFinder::class);
606  try {
607  $site = $siteFinder->getSiteByRootPageId($pageId);
608  $domain = (string)$site->getBase();
610  // No site found
611  }
612 
613  return $domain;
614  }
615 
619  protected function ‪getMountPointPath(int ‪$uid): string
620  {
621  if (‪$uid <= 0) {
622  return '';
623  }
624  $rootline = array_reverse(BackendUtility::BEgetRootLine(‪$uid));
625  array_shift($rootline);
626  $path = [];
627  foreach ($rootline as $rootlineElement) {
628  ‪$record = BackendUtility::getRecordWSOL('pages', $rootlineElement['uid'], 'title, nav_title', '', true, true);
629  $text = ‪$record['title'];
630  if ($this->useNavTitle && trim(‪$record['nav_title'] ?? '') !== '') {
631  $text = ‪$record['nav_title'];
632  }
633  $path[] = htmlspecialchars($text);
634  }
635  return '/' . implode('/', $path);
636  }
637 
641  protected function ‪isDragMoveAllowed(): bool
642  {
643  $backendUser = $this->‪getBackendUser();
644  return $backendUser->isAdmin()
645  || ($backendUser->check('tables_modify', 'pages') && $backendUser->checkLanguageAccess(0));
646  }
647 
653  protected function ‪getAllowedMountPoints(): array
654  {
655  $mountPoints = (int)($this->‪getBackendUser()->uc['pageTree_temporaryMountPoint'] ?? 0);
656  if (!$mountPoints) {
657  if (!empty($this->alternativeEntryPoints)) {
659  }
660  $mountPoints = array_map(intval(...), $this->‪getBackendUser()->returnWebmounts());
661  return array_unique($mountPoints);
662  }
663  return [$mountPoints];
664  }
665 
666  protected function ‪getPostProcessedPageItems(ServerRequestInterface $request, array $items): array
667  {
668  return array_map(
669  static function (array $item): array {
670  // Unset _page, which holds the page record and was only provided for the event listeners
671  unset($item['_page']);
672  return $item;
673  },
674  GeneralUtility::makeInstance(EventDispatcherInterface::class)->dispatch(
676  )->getItems()
677  );
678  }
679 
680  protected function ‪getBackendUser(): ‪BackendUserAuthentication
681  {
682  return ‪$GLOBALS['BE_USER'];
683  }
684 
685  protected function ‪getLanguageService(): ?‪LanguageService
686  {
687  return ‪$GLOBALS['LANG'] ?? null;
688  }
689 }
‪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\Backend\Controller\Page\TreeController\getDomainNameForPage
‪getDomainNameForPage(int $pageId)
Definition: TreeController.php:592
‪TYPO3\CMS\Core\Database\Query\Restriction\DocumentTypeExclusionRestriction
Definition: DocumentTypeExclusionRestriction.php:27
‪TYPO3\CMS\Backend\Controller\Page\TreeController\getAllowedMountPoints
‪int[] getAllowedMountPoints()
Definition: TreeController.php:643
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$uriBuilder
‪UriBuilder $uriBuilder
Definition: TreeController.php:114
‪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:167
‪TYPO3\CMS\Backend\Controller\Page\TreeController\getMountPointPath
‪getMountPointPath(int $uid)
Definition: TreeController.php:609
‪TYPO3\CMS\Backend\Controller\Page\TreeController\initializeConfiguration
‪initializeConfiguration(ServerRequestInterface $request)
Definition: TreeController.php:129
‪TYPO3\CMS\Core\Utility\RootlineUtility
Definition: RootlineUtility.php:40
‪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\pagesToFlatArray
‪pagesToFlatArray(array $page, int $entryPoint, int $depth=0, array $inheritedData=[])
Definition: TreeController.php:332
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$expandedState
‪array $expandedState
Definition: TreeController.php:89
‪TYPO3\CMS\Backend\Controller\Page\TreeController\setTemporaryMountPointAction
‪setTemporaryMountPointAction(ServerRequestInterface $request)
Definition: TreeController.php:303
‪TYPO3\CMS\Core\Authentication\JsConfirmation
Definition: JsConfirmation.php:28
‪TYPO3\CMS\Core\Imaging\IconFactory
Definition: IconFactory.php:34
‪TYPO3\CMS\Backend\Controller\Page\TreeController\calculateBackgroundColors
‪calculateBackgroundColors(array $pageIds)
Definition: TreeController.php:570
‪TYPO3\CMS\Backend\Controller\Page
Definition: LocalizationController.php:18
‪TYPO3\CMS\Backend\Controller\Page\TreeController\filterDataAction
‪filterDataAction(ServerRequestInterface $request)
Definition: TreeController.php:275
‪TYPO3\CMS\Backend\Controller\Page\TreeController\fetchDataAction
‪fetchDataAction(ServerRequestInterface $request)
Definition: TreeController.php:247
‪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\Backend\Controller\Page\TreeController\$backgroundColors
‪array $backgroundColors
Definition: TreeController.php:77
‪TYPO3\CMS\Backend\Controller\Page\TreeController\getDokTypes
‪getDokTypes()
Definition: TreeController.php:210
‪TYPO3\CMS\Core\Schema\Struct\SelectItem
Definition: SelectItem.php:21
‪TYPO3\CMS\Backend\Configuration\BackendUserConfiguration
Definition: BackendUserConfiguration.php:30
‪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:453
‪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:656
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
Definition: BackendUserAuthentication.php:60
‪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:479
‪TYPO3\CMS\Core\Authentication\JsConfirmation\DELETE
‪const DELETE
Definition: JsConfirmation.php:31
‪$output
‪$output
Definition: annotationChecker.php:119
‪TYPO3\CMS\Backend\Controller\Page\TreeController\__construct
‪__construct()
Definition: TreeController.php:123
‪TYPO3\CMS\Backend\Controller\Page\TreeController\getBackendUser
‪getBackendUser()
Definition: TreeController.php:670
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$expandAllNodes
‪bool $expandAllNodes
Definition: TreeController.php:106
‪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:40
‪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:118
‪TYPO3\CMS\Backend\Controller\Page\TreeController\isDragMoveAllowed
‪isDragMoveAllowed()
Definition: TreeController.php:631
‪TYPO3\CMS\Backend\Controller\Page\TreeController\getLanguageService
‪getLanguageService()
Definition: TreeController.php:675
‪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:46
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:51
‪TYPO3\CMS\Backend\Controller\Page\TreeController\fetchReadOnlyConfigurationAction
‪fetchReadOnlyConfigurationAction(ServerRequestInterface $request)
Definition: TreeController.php:183
‪TYPO3\CMS\Backend\Controller\Page\TreeController\$showMountPathAboveMounts
‪bool $showMountPathAboveMounts
Definition: TreeController.php:71
‪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:118