‪TYPO3CMS  ‪main
PageInformationFactory.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\ServerRequestInterface;
22 use Psr\Log\LoggerInterface;
43 
62 final readonly class ‪PageInformationFactory
63 {
64  public function ‪__construct(
65  private ‪Context $context,
66  private EventDispatcherInterface $eventDispatcher,
67  private LoggerInterface $logger,
68  private ‪RecordAccessVoter $accessVoter,
69  private ‪ErrorController $errorController,
70  private ‪SysTemplateRepository $sysTemplateRepository,
71  ) {}
72 
86  public function ‪create(ServerRequestInterface $request): ‪PageInformation
87  {
88  // Set Initial, not yet validated values from routing.
89  $pageInformation = new ‪PageInformation();
90  $pageInformation->setId($request->getAttribute('routing')->getPageId());
91  if (‪$GLOBALS['TYPO3_CONF_VARS']['FE']['enable_mount_pids'] ?? false) {
92  $mountPoint = (string)($request->getAttribute('routing')->getArguments()['MP'] ?? '');
93  // Ensure no additional arguments are given via the &MP=123-345,908-172 (e.g. "/")
94  $pageInformation->setMountPoint(preg_replace('/[^0-9,-]/', '', $mountPoint));
95  }
96 
97  $event = $this->eventDispatcher->dispatch(new ‪BeforePageIsResolvedEvent($request, $pageInformation));
98  $pageInformation = $event->getPageInformation();
99 
100  $pageInformation = $this->‪setPageAndRootline($request, $pageInformation);
101  $this->‪checkCrossDomainWithDirectId($request, $pageInformation);
102 
103  $event = $this->eventDispatcher->dispatch(new ‪AfterPageWithRootLineIsResolvedEvent($request, $pageInformation));
104  if ($event->getResponse()) {
105  throw new ‪PageInformationCreationFailedException($event->getResponse(), 1705419743);
106  }
107  $pageInformation = $event->getPageInformation();
108 
109  $pageInformation = $this->‪settingLanguage($request, $pageInformation);
110  $pageInformation = $this->‪setContentFromPid($request, $pageInformation);
111  $this->‪checkBackendUserAccess($request, $pageInformation);
112 
113  $event = $this->eventDispatcher->dispatch(new ‪AfterPageAndLanguageIsResolvedEvent($request, $pageInformation));
114  if ($event->getResponse()) {
115  throw new ‪PageInformationCreationFailedException($event->getResponse(), 1705420010);
116  }
117  $pageInformation = $event->getPageInformation();
118 
119  $pageInformation = $this->‪setSysTemplateRows($request, $pageInformation);
120  return $this->‪setLocalRootLine($request, $pageInformation);
121  }
122 
131  protected function ‪setPageAndRootline(ServerRequestInterface $request, ‪PageInformation $pageInformation): ‪PageInformation
132  {
133  $id = $pageInformation->‪getId();
134  $pageRepository = GeneralUtility::makeInstance(PageRepository::class);
135  $mountPoint = $pageInformation->‪getMountPoint();
136  $pageRecord = $pageRepository->getPage($id);
137 
138  if (empty($pageRecord)) {
139  // @todo: This logic could be streamlined is general. The idea of PageRepository->getPage() is
140  // to have *one* query that does all the access checks already, to save queries. Only
141  // if this goes wrong more queries are fired to find out details.
142  // This is ugly. It would be better to query the page without checks and return it, probably
143  // only doing the deleted=1 check. If that does not resolve: 404. Then apply the hidden
144  // and groups checks in PHP on the page record without further queries, to error out
145  // whenever a single step goes wrong. Or have a single method that follows this strategy
146  // and throws dedicated exceptions like a PageHiddenException or similar to catch it here
147  // and act accordingly.
148  // This strategy would turn the guesswork logic below around and would be easier to
149  // maintain and follow in general. It would also clean up the various methods with their
150  // subtle differences: getPage($id), getPage($id, true) and getPage_noCheck($id).
151  // PageRepository->getPage() did not return a page. This can have
152  // different reasons. We want to error out with different status codes.
153  $hiddenField = ‪$GLOBALS['TCA']['pages']['ctrl']['enablecolumns']['disabled'] ?? '';
154  $includeHiddenPages = $this->context->getPropertyFromAspect('visibility', 'includeHiddenPages') || $this->context->getPropertyFromAspect('backend.user', 'isLoggedIn', false);
155  if (!empty($hiddenField) && !$includeHiddenPages) {
156  // Page is hidden, user has no access. 404. This is deliberately done in default language
157  // since language overlays should not be rendered when default language is hidden.
158  $rawPageRecord = $pageRepository->getPage_noCheck($id);
159  if ($rawPageRecord === [] || $rawPageRecord[$hiddenField]) {
160  $response = $this->errorController->pageNotFoundAction(
161  $request,
162  'The requested page does not exist!',
164  );
165  throw new ‪PageInformationCreationFailedException($response, 1674144383);
166  }
167  }
168  $requestedPageRowWithoutGroupCheck = $pageRepository->getPage($id, true);
169  if (!empty($requestedPageRowWithoutGroupCheck)) {
170  // We know now the page could not be received, but the reason is *not* that the
171  // page is hidden and the user has no hidden access. So group access failed? 403.
172  $response = $this->errorController->accessDeniedAction(
173  $request,
174  'ID was not an accessible page',
175  [
177  'direct_access' => [
178  0 => $requestedPageRowWithoutGroupCheck,
179  ],
180  ],
181  );
182  throw new ‪PageInformationCreationFailedException($response, 1705325336);
183  }
184  // Else 404 for 'record not exists' or similar.
185  $response = $this->errorController->pageNotFoundAction(
186  $request,
187  'The requested page does not exist!',
189  );
190  throw new ‪PageInformationCreationFailedException($response, 1533931330);
191  }
192 
193  $pageInformation->‪setPageRecord($pageRecord);
194  $pageDoktype = (int)($pageRecord['doktype']);
195 
196  if ($pageDoktype === ‪PageRepository::DOKTYPE_SPACER || $pageDoktype === ‪PageRepository::DOKTYPE_SYSFOLDER) {
197  // Spacer and sysfolders are not accessible in frontend
198  $response = $this->errorController->pageNotFoundAction(
199  $request,
200  'The requested page does not exist!',
202  );
203  throw new ‪PageInformationCreationFailedException($response, 1533931343);
204  }
205 
206  if ($pageDoktype === ‪PageRepository::DOKTYPE_SHORTCUT) {
207  // Resolve shortcut page target.
208  // Clear mount point if page is a shortcut: If the shortcut goes to
209  // another page, we leave the rootline which the MP expects.
210  $mountPoint = '';
211  $pageInformation->‪setMountPoint($mountPoint);
212  // Saving the page so that we can check later - when we know about languages - whether we took the correct shortcut
213  // or if a translation of the page overwrites the shortcut target, and we need to follow the new target.
214  $pageInformation = $this->‪settingLanguage($request, $pageInformation);
215  // Reset vars to new state that may have been created by settingLanguage()
216  $pageRepository = GeneralUtility::makeInstance(PageRepository::class);
217  $pageRecord = $pageInformation->‪getPageRecord();
218  $pageInformation->‪setOriginalShortcutPageRecord($pageRecord);
219  try {
220  $pageRecord = $pageRepository->resolveShortcutPage($pageRecord, true);
222  $response = $this->errorController->pageNotFoundAction(
223  $request,
224  'ID was not an accessible page',
226  );
227  throw new ‪PageInformationCreationFailedException($response, 1705335065);
228  }
229  $pageInformation->‪setPageRecord($pageRecord);
230  $id = (int)$pageRecord['uid'];
231  $pageInformation->‪setId($id);
232  $pageDoktype = (int)($pageRecord['doktype'] ?? 0);
233  }
234 
235  if ($pageDoktype === ‪PageRepository::DOKTYPE_MOUNTPOINT && $pageRecord['mount_pid_ol']) {
236  // If the page is a mount point which should be overlaid with the contents of the mounted page,
237  // it must never be accessible directly, but only in the mount point context.
238  // We thus change the current page id.
239  $originalMountPointPageRecord = $pageRecord;
240  $pageInformation->‪setOriginalMountPointPageRecord($pageRecord);
241  $pageRecord = $pageRepository->getPage((int)$originalMountPointPageRecord['mount_pid']);
242  if (empty($pageRecord)) {
243  // Target mount point page not accessible for some reason.
244  $response = $this->errorController->pageNotFoundAction(
245  $request,
246  'The requested page does not exist!',
248  );
249  throw new ‪PageInformationCreationFailedException($response, 1705425523);
250  }
251  $pageInformation->‪setPageRecord($pageRecord);
252  if ($mountPoint === '' || !empty($pageInformation->‪getOriginalShortcutPageRecord())) {
253  // If the current page is a shortcut, the MP parameter will be replaced
254  $mountPoint = $pageRecord['uid'] . '-' . $originalMountPointPageRecord['uid'];
255  } else {
256  $mountPoint = $mountPoint . ',' . $pageRecord['uid'] . '-' . $originalMountPointPageRecord['uid'];
257  }
258  $pageInformation->‪setMountPoint($mountPoint);
259  $id = (int)$pageRecord['uid'];
260  $pageInformation->‪setId($id);
261  }
262 
263  // Get rootLine and error out if it can not be retrieved.
264  $pageInformation->‪setRootLine($this->‪getRootlineOrThrow($request, $id, $mountPoint));
265 
266  // Check 'extendToSubpages' in rootLine and backend user section.
267  $this->‪checkRootlineForIncludeSection($request, $pageInformation);
268  return $pageInformation;
269  }
270 
283  protected function ‪settingLanguage(ServerRequestInterface $request, ‪PageInformation $pageInformation): ‪PageInformation
284  {
285  $site = $request->getAttribute('site');
286  $language = $request->getAttribute('language', $site->getDefaultLanguage());
287  $languageAspect = ‪LanguageAspectFactory::createFromSiteLanguage($language);
288  $languageId = $languageAspect->getId();
289  $languageContentId = $languageAspect->getContentId();
290 
291  $pageRecord = $pageInformation->‪getPageRecord();
292 
293  $pageTranslationVisibility = new ‪PageTranslationVisibility((int)($pageRecord['l18n_cfg'] ?? 0));
294  if ($languageAspect->getId() > 0) {
295  // If the incoming language is set to another language than default
296  $pageRepository = GeneralUtility::makeInstance(PageRepository::class);
297  $olRec = $pageRepository->getPageOverlay($pageRecord, $languageAspect);
298  $overlaidLanguageId = (int)($olRec['sys_language_uid'] ?? 0);
299  if ($overlaidLanguageId !== $languageAspect->getId()) {
300  // If requested translation is not available
301  if ($pageTranslationVisibility->shouldHideTranslationIfNoTranslatedRecordExists()) {
302  $response = $this->errorController->pageNotFoundAction(
303  $request,
304  'Page is not available in the requested language.',
306  );
307  throw new ‪PageInformationCreationFailedException($response, 1533931388);
308  }
309  switch ($languageAspect->getLegacyLanguageMode()) {
310  case 'strict':
311  $response = $this->errorController->pageNotFoundAction(
312  $request,
313  'Page is not available in the requested language (strict).',
315  );
316  throw new ‪PageInformationCreationFailedException($response, 1533931395);
317  case 'content_fallback':
318  // Setting content uid (but leaving the sys_language_uid) when a content_fallback value was found.
319  foreach ($languageAspect->getFallbackChain() as $orderValue) {
320  if ($orderValue === '0' || $orderValue === 0 || $orderValue === '') {
321  $languageContentId = 0;
322  break;
323  }
324  if (‪MathUtility::canBeInterpretedAsInteger($orderValue) && $overlaidLanguageId === (int)$orderValue) {
325  $languageContentId = (int)$orderValue;
326  break;
327  }
328  if ($orderValue === 'pageNotFound') {
329  // The existing fallbacks have not been found, but instead of continuing page rendering
330  // with default language, a "page not found" message should be shown instead.
331  $response = $this->errorController->pageNotFoundAction(
332  $request,
333  'Page is not available in the requested language (fallbacks did not apply).',
335  );
336  throw new ‪PageInformationCreationFailedException($response, 1533931402);
337  }
338  }
339  break;
340  default:
341  // Default is that everything defaults to the default language.
342  $languageId = ($languageContentId = 0);
343  }
344  }
345 
346  // Define the language aspect again now
347  $languageAspect = new ‪LanguageAspect(
348  $languageId,
349  $languageContentId,
350  $languageAspect->getOverlayType(),
351  $languageAspect->getFallbackChain()
352  );
353 
354  // Setting localized page record if an overlay record was found (which it is only if a language is used)
355  // Doing this ensures that page properties like the page title are resolved in the correct language.
356  $pageInformation->‪setPageRecord($olRec);
357  }
358 
359  // Set the final language aspect!
360  $this->context->setAspect('language', $languageAspect);
361 
362  if ((!$languageAspect->getContentId() || !$languageAspect->getId())
363  && $pageTranslationVisibility->shouldBeHiddenInDefaultLanguage()
364  ) {
365  // If default language is not available
366  $response = $this->errorController->pageNotFoundAction(
367  $request,
368  'Page is not available in default language.',
370  );
371  throw new ‪PageInformationCreationFailedException($response, 1533931423);
372  }
373 
374  if ($languageAspect->getId() > 0) {
375  // Updating rootLine with translations if the language key is set.
376  $pageInformation->‪setRootLine(
377  $this->‪getRootlineOrThrow($request, $pageInformation->‪getId(), $pageInformation->‪getMountPoint())
378  );
379  }
380 
381  return $pageInformation;
382  }
383 
395  protected function ‪setContentFromPid(ServerRequestInterface $request, ‪PageInformation $pageInformation): ‪PageInformation
396  {
397  $contentFromPid = (int)($pageInformation->‪getPageRecord()['content_from_pid'] ?? 0);
398  if ($contentFromPid === 0) {
399  // $pageInformation->contentFromPid is always initialized, usually identical with id.
400  $pageInformation->‪setContentFromPid($pageInformation->‪getId());
401  return $pageInformation;
402  }
403  // Verify content target pid is good and resolves all access restrictions and similar.
404  $targetPageInformation = new ‪PageInformation();
405  $targetPageInformation->setId($contentFromPid);
406  $targetPageInformation = $this->‪setPageAndRootline($request, $targetPageInformation);
407  // Above call did not throw. Set the verified id.
408  $pageInformation->‪setContentFromPid($targetPageInformation->getId());
409  return $pageInformation;
410  }
411 
425  protected function ‪checkRootlineForIncludeSection(ServerRequestInterface $request, ‪PageInformation $pageInformation): void
426  {
427  $rootLine = $pageInformation->‪getRootLine();
428  for ($a = 0; $a < count($rootLine); $a++) {
429  $rootLineEntry = $rootLine[$a];
430  if (!$this->accessVoter->accessGrantedForPageInRootLine($rootLineEntry, $this->context)) {
431  // accessGrantedForPageInRootLine() does the main check for 'extendToSubpages'.
432  $response = $this->errorController->accessDeniedAction(
433  $request,
434  'Subsection was found and not accessible',
435  [
437  'sub_section' => [
438  0 => $rootLineEntry,
439  ],
440  ],
441  );
442  throw new ‪PageInformationCreationFailedException($response, 1705337296);
443  }
444  if ((int)$rootLineEntry['doktype'] === ‪PageRepository::DOKTYPE_BE_USER_SECTION) {
445  // Only logged in backend users with 'PAGE_SHOW' permissions are allowed to FE render backend user sections.
446  $isBackendUserLoggedIn = $this->context->getPropertyFromAspect('backend.user', 'isLoggedIn', false);
447  if (!$isBackendUserLoggedIn) {
448  $response = $this->errorController->accessDeniedAction(
449  $request,
450  'Subsection was found and not accessible',
452  );
453  throw new ‪PageInformationCreationFailedException($response, 1705416744);
454  }
455  if (!$this->‪getBackendUser()->doesUserHaveAccess($pageInformation->‪getPageRecord(), ‪Permission::PAGE_SHOW)) {
456  $response = $this->errorController->accessDeniedAction(
457  $request,
458  'Subsection was found and not accessible',
460  );
461  throw new ‪PageInformationCreationFailedException($response, 1705337701);
462  }
463  }
464  }
465  }
466 
478  protected function ‪checkCrossDomainWithDirectId(ServerRequestInterface $request, ‪PageInformation $pageInformation): void
479  {
480  $directlyRequestedId = (int)($request->getQueryParams()['id'] ?? 0);
481  $shortcutId = (int)($pageInformation->‪getOriginalShortcutPageRecord()['uid'] ?? 0);
482  if ($directlyRequestedId && $shortcutId !== $directlyRequestedId) {
483  $rootLine = $pageInformation->‪getRootLine();
484  $siteRootPageId = $request->getAttribute('site')->getRootPageId();
485  $siteRootWithinRootlineFound = false;
486  foreach ($rootLine as $pageInRootLine) {
487  if ((int)$pageInRootLine['uid'] === $siteRootPageId) {
488  $siteRootWithinRootlineFound = true;
489  break;
490  }
491  }
492  if (!$siteRootWithinRootlineFound) {
493  $response = $this->errorController->pageNotFoundAction(
494  $request,
495  'ID was outside the domain',
497  );
498  throw new ‪PageInformationCreationFailedException($response, 1705397417);
499  }
500  }
501  }
502 
509  protected function ‪checkBackendUserAccess(ServerRequestInterface $request, ‪PageInformation $pageInformation): void
510  {
511  if ($this->context->getPropertyFromAspect('backend.user', 'isLoggedIn', false)
512  && $this->context->getPropertyFromAspect('frontend.preview', 'isPreview', false)
513  && !‪$GLOBALS['BE_USER']->doesUserHaveAccess($pageInformation->‪getPageRecord(), ‪Permission::PAGE_SHOW)
514  ) {
515  $response = $this->errorController->accessDeniedAction(
516  $request,
517  'ID was not an accessible page',
519  );
520  throw new ‪PageInformationCreationFailedException($response, 1705422293);
521  }
522  }
523 
534  protected function ‪setSysTemplateRows(ServerRequestInterface $request, ‪PageInformation $pageInformation): ‪PageInformation
535  {
536  $site = $request->getAttribute('site');
537  $rootLine = $pageInformation->‪getRootLine();
538  if ($site instanceof ‪Site && $site->‪isTypoScriptRoot()) {
539  $rootLineUntilSite = [];
540  foreach ($rootLine as $index => $rootlinePage) {
541  $rootLineUntilSite[$index] = $rootlinePage;
542  $pageId = (int)($rootlinePage['uid'] ?? 0);
543  if ($pageId === $site->getRootPageId()) {
544  break;
545  }
546  }
547  $rootLine = $rootLineUntilSite;
548  }
549  $sysTemplateRows = $this->sysTemplateRepository->getSysTemplateRowsByRootline($rootLine, $request);
550  $pageInformation->‪setSysTemplateRows($sysTemplateRows);
551  return $pageInformation;
552  }
553 
557  protected function ‪setLocalRootLine(ServerRequestInterface $request, ‪PageInformation $pageInformation): ‪PageInformation
558  {
559  $site = $request->getAttribute('site');
560  $sysTemplateRows = $pageInformation->‪getSysTemplateRows();
561  $rootLine = $pageInformation->‪getRootLine();
562  $sysTemplateRowsIndexedByPid = array_combine(array_column($sysTemplateRows, 'pid'), $sysTemplateRows);
563  $localRootline = [];
564  foreach ($rootLine as $rootlinePage) {
565  array_unshift($localRootline, $rootlinePage);
566  $pageId = (int)($rootlinePage['uid'] ?? 0);
567  if ($pageId === $site->getRootPageId() && $site->isTypoScriptRoot()) {
568  break;
569  }
570  if ($pageId > 0 && (int)($sysTemplateRowsIndexedByPid[$pageId]['root'] ?? 0) === 1) {
571  break;
572  }
573  }
574  $pageInformation->‪setLocalRootLine($localRootline);
575  return $pageInformation;
576  }
577 
583  protected function ‪getRootlineOrThrow(ServerRequestInterface $request, int $pageId, string $mountPoint): array
584  {
585  $rootLine = [];
586  try {
587  $rootLine = GeneralUtility::makeInstance(RootlineUtility::class, $pageId, $mountPoint)->get();
588  } catch (‪RootLineException) {
589  // Empty / broken rootline handled below.
590  }
591  if (!empty($rootLine)) {
592  // All good.
593  return $rootLine;
594  }
595  // Error case: Log and render error.
596  $message = 'The requested page did not have a proper connection to the tree root!';
597  $context = [
598  'pageId' => $pageId,
599  'requestUrl' => $request->getAttribute('normalizedParams')->getRequestUrl(),
600  ];
601  $this->logger->error($message, $context);
602  try {
603  $response = $this->errorController->internalErrorAction(
604  $request,
605  $message,
607  );
608  throw new ‪PageInformationCreationFailedException($response, 1533931350);
609  } catch (‪StatusException $up) {
610  $this->logger->error($message, ['exception' => $up]);
611  throw $up;
612  }
613  }
614 
616  {
617  return ‪$GLOBALS['BE_USER'] ?? null;
618  }
619 }
‪TYPO3\CMS\Frontend\Page\PageAccessFailureReasons\LANGUAGE_AND_FALLBACKS_NOT_AVAILABLE
‪const LANGUAGE_AND_FALLBACKS_NOT_AVAILABLE
Definition: PageAccessFailureReasons.php:44
‪TYPO3\CMS\Frontend\Page\PageInformation\getMountPoint
‪getMountPoint()
Definition: PageInformation.php:140
‪TYPO3\CMS\Core\TypoScript\IncludeTree\SysTemplateRepository
Definition: SysTemplateRepository.php:38
‪TYPO3\CMS\Frontend\Page\PageInformation\setMountPoint
‪setMountPoint(string $mountPoint)
Definition: PageInformation.php:132
‪TYPO3\CMS\Frontend\Page\PageInformationFactory\checkBackendUserAccess
‪checkBackendUserAccess(ServerRequestInterface $request, PageInformation $pageInformation)
Definition: PageInformationFactory.php:509
‪TYPO3\CMS\Core\Context\LanguageAspectFactory
Definition: LanguageAspectFactory.php:27
‪TYPO3\CMS\Frontend\Page\PageInformation\setLocalRootLine
‪setLocalRootLine(array $localRootLine)
Definition: PageInformation.php:161
‪TYPO3\CMS\Backend\FrontendBackendUserAuthentication
Definition: FrontendBackendUserAuthentication.php:29
‪TYPO3\CMS\Frontend\Page\PageInformationFactory\setLocalRootLine
‪setLocalRootLine(ServerRequestInterface $request, PageInformation $pageInformation)
Definition: PageInformationFactory.php:557
‪TYPO3\CMS\Frontend\Page\PageInformationFactory\getRootlineOrThrow
‪non empty array getRootlineOrThrow(ServerRequestInterface $request, int $pageId, string $mountPoint)
Definition: PageInformationFactory.php:583
‪TYPO3\CMS\Frontend\Page\PageInformationFactory\create
‪create(ServerRequestInterface $request)
Definition: PageInformationFactory.php:86
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\DOKTYPE_SHORTCUT
‪const DOKTYPE_SHORTCUT
Definition: PageRepository.php:100
‪TYPO3\CMS\Core\Context\LanguageAspectFactory\createFromSiteLanguage
‪static createFromSiteLanguage(SiteLanguage $language)
Definition: LanguageAspectFactory.php:31
‪TYPO3\CMS\Frontend\Page\PageInformation\getSysTemplateRows
‪getSysTemplateRows()
Definition: PageInformation.php:182
‪TYPO3\CMS\Core\Utility\RootlineUtility
Definition: RootlineUtility.php:40
‪TYPO3\CMS\Frontend\Event\BeforePageIsResolvedEvent
Definition: BeforePageIsResolvedEvent.php:31
‪TYPO3\CMS\Frontend\Page\PageInformationFactory\settingLanguage
‪settingLanguage(ServerRequestInterface $request, PageInformation $pageInformation)
Definition: PageInformationFactory.php:283
‪TYPO3\CMS\Frontend\Page\PageInformationFactory\__construct
‪__construct(private Context $context, private EventDispatcherInterface $eventDispatcher, private LoggerInterface $logger, private RecordAccessVoter $accessVoter, private ErrorController $errorController, private SysTemplateRepository $sysTemplateRepository,)
Definition: PageInformationFactory.php:64
‪TYPO3\CMS\Core\Type\Bitmask\PageTranslationVisibility
Definition: PageTranslationVisibility.php:30
‪TYPO3\CMS\Frontend\Page\PageInformationFactory\setContentFromPid
‪setContentFromPid(ServerRequestInterface $request, PageInformation $pageInformation)
Definition: PageInformationFactory.php:395
‪TYPO3\CMS\Frontend\Controller\ErrorController
Definition: ErrorController.php:38
‪TYPO3\CMS\Frontend\Page\PageAccessFailureReasons\ACCESS_DENIED_INVALID_PAGETYPE
‪const ACCESS_DENIED_INVALID_PAGETYPE
Definition: PageAccessFailureReasons.php:52
‪TYPO3\CMS\Core\Context\Context
Definition: Context.php:54
‪TYPO3\CMS\Frontend\Page\PageInformation\setOriginalMountPointPageRecord
‪setOriginalMountPointPageRecord(array $originalMountPointPageRecord)
Definition: PageInformation.php:206
‪TYPO3\CMS\Frontend\Page\PageInformation\getRootLine
‪getRootLine()
Definition: PageInformation.php:153
‪TYPO3\CMS\Frontend\Page\PageInformation\setId
‪setId(int $id)
Definition: PageInformation.php:106
‪TYPO3\CMS\Core\Type\Bitmask\Permission
Definition: Permission.php:26
‪TYPO3\CMS\Frontend\Page\PageInformation\setSysTemplateRows
‪setSysTemplateRows(array $sysTemplateRows)
Definition: PageInformation.php:174
‪TYPO3\CMS\Frontend\Page\PageInformationCreationFailedException
Definition: PageInformationCreationFailedException.php:31
‪TYPO3\CMS\Core\Site\Entity\Site
Definition: Site.php:42
‪TYPO3\CMS\Frontend\Page\PageInformationFactory\getBackendUser
‪getBackendUser()
Definition: PageInformationFactory.php:615
‪TYPO3\CMS\Core\Error\Http\StatusException
Definition: StatusException.php:26
‪TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger
‪static bool canBeInterpretedAsInteger(mixed $var)
Definition: MathUtility.php:69
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\DOKTYPE_MOUNTPOINT
‪const DOKTYPE_MOUNTPOINT
Definition: PageRepository.php:102
‪TYPO3\CMS\Frontend\Page\PageInformationFactory\setPageAndRootline
‪setPageAndRootline(ServerRequestInterface $request, PageInformation $pageInformation)
Definition: PageInformationFactory.php:131
‪TYPO3\CMS\Frontend\Page\PageAccessFailureReasons\ACCESS_DENIED_HOST_PAGE_MISMATCH
‪const ACCESS_DENIED_HOST_PAGE_MISMATCH
Definition: PageAccessFailureReasons.php:51
‪TYPO3\CMS\Frontend\Page\PageInformation\setOriginalShortcutPageRecord
‪setOriginalShortcutPageRecord(array $originalShortcutPageRecord)
Definition: PageInformation.php:190
‪TYPO3\CMS\Frontend\Page\PageAccessFailureReasons\ACCESS_DENIED_PAGE_NOT_RESOLVED
‪const ACCESS_DENIED_PAGE_NOT_RESOLVED
Definition: PageAccessFailureReasons.php:49
‪TYPO3\CMS\Frontend\Page\PageAccessFailureReasons\LANGUAGE_DEFAULT_NOT_AVAILABLE
‪const LANGUAGE_DEFAULT_NOT_AVAILABLE
Definition: PageAccessFailureReasons.php:45
‪TYPO3\CMS\Frontend\Event\AfterPageAndLanguageIsResolvedEvent
Definition: AfterPageAndLanguageIsResolvedEvent.php:32
‪TYPO3\CMS\Frontend\Page\PageInformationFactory\checkCrossDomainWithDirectId
‪checkCrossDomainWithDirectId(ServerRequestInterface $request, PageInformation $pageInformation)
Definition: PageInformationFactory.php:478
‪TYPO3\CMS\Frontend\Page\PageAccessFailureReasons\LANGUAGE_NOT_AVAILABLE
‪const LANGUAGE_NOT_AVAILABLE
Definition: PageAccessFailureReasons.php:42
‪TYPO3\CMS\Frontend\Page\PageAccessFailureReasons\PAGE_NOT_FOUND
‪const PAGE_NOT_FOUND
Definition: PageAccessFailureReasons.php:28
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\DOKTYPE_SPACER
‪const DOKTYPE_SPACER
Definition: PageRepository.php:103
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\DOKTYPE_BE_USER_SECTION
‪const DOKTYPE_BE_USER_SECTION
Definition: PageRepository.php:101
‪TYPO3\CMS\Frontend\Page\PageAccessFailureReasons\ACCESS_DENIED_SUBSECTION_NOT_RESOLVED
‪const ACCESS_DENIED_SUBSECTION_NOT_RESOLVED
Definition: PageAccessFailureReasons.php:50
‪TYPO3\CMS\Frontend\Page\PageInformation\getId
‪getId()
Definition: PageInformation.php:111
‪TYPO3\CMS\Frontend\Page\PageInformation\setPageRecord
‪setPageRecord(array $pageRecord)
Definition: PageInformation.php:119
‪TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_SHOW
‪const PAGE_SHOW
Definition: Permission.php:35
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\DOKTYPE_SYSFOLDER
‪const DOKTYPE_SYSFOLDER
Definition: PageRepository.php:104
‪TYPO3\CMS\Core\Context\LanguageAspect
Definition: LanguageAspect.php:57
‪TYPO3\CMS\Frontend\Page
Definition: CacheHashCalculator.php:16
‪TYPO3\CMS\Frontend\Event\AfterPageWithRootLineIsResolvedEvent
Definition: AfterPageWithRootLineIsResolvedEvent.php:31
‪TYPO3\CMS\Frontend\Page\PageInformation\getPageRecord
‪getPageRecord()
Definition: PageInformation.php:124
‪TYPO3\CMS\Frontend\Page\PageInformation\getOriginalShortcutPageRecord
‪getOriginalShortcutPageRecord()
Definition: PageInformation.php:198
‪TYPO3\CMS\Frontend\Page\PageAccessFailureReasons\LANGUAGE_NOT_AVAILABLE_STRICT_MODE
‪const LANGUAGE_NOT_AVAILABLE_STRICT_MODE
Definition: PageAccessFailureReasons.php:43
‪TYPO3\CMS\Core\Site\Entity\Site\isTypoScriptRoot
‪isTypoScriptRoot()
Definition: Site.php:329
‪TYPO3\CMS\Frontend\Page\PageInformationFactory\checkRootlineForIncludeSection
‪checkRootlineForIncludeSection(ServerRequestInterface $request, PageInformation $pageInformation)
Definition: PageInformationFactory.php:425
‪TYPO3\CMS\Core\Error\Http\ShortcutTargetPageNotFoundException
Definition: ShortcutTargetPageNotFoundException.php:23
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Core\Utility\MathUtility
Definition: MathUtility.php:24
‪TYPO3\CMS\Frontend\Page\PageInformationFactory\setSysTemplateRows
‪setSysTemplateRows(ServerRequestInterface $request, PageInformation $pageInformation)
Definition: PageInformationFactory.php:534
‪TYPO3\CMS\Core\Exception\Page\RootLineException
Definition: RootLineException.php:24
‪TYPO3\CMS\Core\Domain\Repository\PageRepository
Definition: PageRepository.php:69
‪TYPO3\CMS\Frontend\Page\PageInformation\setRootLine
‪setRootLine(array $rootLine)
Definition: PageInformation.php:148
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52
‪TYPO3\CMS\Frontend\Page\PageInformation\setContentFromPid
‪setContentFromPid(int $contentFromPid)
Definition: PageInformation.php:222
‪TYPO3\CMS\Core\Domain\Access\RecordAccessVoter
Definition: RecordAccessVoter.php:29
‪TYPO3\CMS\Frontend\Page\PageInformation
Definition: PageInformation.php:28
‪TYPO3\CMS\Frontend\Page\PageAccessFailureReasons\ROOTLINE_BROKEN
‪const ROOTLINE_BROKEN
Definition: PageAccessFailureReasons.php:29
‪TYPO3\CMS\Frontend\Page\PageInformationFactory
Definition: PageInformationFactory.php:63