‪TYPO3CMS  ‪main
PageRouter.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\ServerRequestInterface;
21 use Psr\Http\Message\UriInterface;
22 use Symfony\Component\Routing\Exception\MissingMandatoryParametersException;
23 use Symfony\Component\Routing\Exception\ResourceNotFoundException;
43 
70 {
71  protected ‪Site ‪$site;
77 
82  {
83  $this->site = ‪$site;
84  $this->context = ‪$context ?? GeneralUtility::makeInstance(Context::class);
85  $this->enhancerFactory = GeneralUtility::makeInstance(EnhancerFactory::class);
86  $this->aspectFactory = GeneralUtility::makeInstance(AspectFactory::class, $this->context);
87  $this->cacheHashCalculator = GeneralUtility::makeInstance(CacheHashCalculator::class);
88  $this->requestContextFactory = GeneralUtility::makeInstance(RequestContextFactory::class);
89  }
90 
98  public function ‪matchRequest(ServerRequestInterface $request, ‪RouteResultInterface $previousResult = null): ‪RouteResultInterface
99  {
100  if ($previousResult === null) {
101  throw new ‪RouteNotFoundException('No previous result given. Cannot find a page for an empty route part', 1555303496);
102  }
103 
104  $candidateProvider = $this->‪getSlugCandidateProvider($this->context);
105 
106  // Legacy URIs (?id=12345) takes precedence, no matter if a route is given
107  $requestId = (int)($request->getQueryParams()['id'] ?? 0);
108  if ($requestId > 0) {
109  if (!empty($pageId = $candidateProvider->getRealPageIdForPageIdAsPossibleCandidate($requestId))) {
110  return new ‪PageArguments(
111  (int)$pageId,
112  (string)($request->getQueryParams()['type'] ?? '0'),
113  [],
114  [],
115  $request->getQueryParams()
116  );
117  }
118  throw new ‪RouteNotFoundException('The requested page does not exist.', 1557839801);
119  }
120 
121  $urlPath = $previousResult->getTail();
122  $language = $previousResult->getLanguage();
123  // Keep possible existing "/" at the end (no trim, just ltrim), even though the page slug might not
124  // contain a "/" at the end. This way we find page candidates where pages MIGHT have a trailing slash
125  // and pages with slugs that do not have a trailing slash
126  // $pageCandidates will contain more records than expected, which is important here, as the ->match() method
127  // will handle this then.
128  // The prepended slash will ensure that the root page of the site tree will also be fetched
129  $prefixedUrlPath = '/' . ltrim($urlPath, '/');
130 
131  $pageCandidates = $candidateProvider->getCandidatesForPath($prefixedUrlPath, $language);
132 
133  // Stop if there are no candidates
134  if (empty($pageCandidates)) {
135  throw new ‪RouteNotFoundException('No page candidates found for path "' . $prefixedUrlPath . '"', 1538389999);
136  }
137 
139  $fullCollection = new ‪RouteCollection();
140  foreach ($pageCandidates ?? [] as $page) {
141  $pageIdForDefaultLanguage = (int)($page['l10n_parent'] ?: $page['uid']);
142  $pagePath = $page['slug'];
143  $pageCollection = new ‪RouteCollection();
144  $defaultRouteForPage = new ‪Route(
145  $pagePath,
146  [],
147  [],
148  ['utf8' => true, '_page' => $page]
149  );
150  $pageCollection->add('default', $defaultRouteForPage);
151  $enhancers = $this->‪getEnhancersForPage($pageIdForDefaultLanguage, $language);
152  foreach ($enhancers as $enhancer) {
153  if ($enhancer instanceof ‪DecoratingEnhancerInterface) {
154  $enhancer->decorateForMatching($pageCollection, $urlPath);
155  }
156  }
157  foreach ($enhancers as $enhancer) {
158  if ($enhancer instanceof ‪RoutingEnhancerInterface) {
159  $enhancer->enhanceForMatching($pageCollection);
160  }
161  }
162 
163  $collectionPrefix = 'page_' . $page['uid'];
164  // Pages with a MountPoint Parameter means that they have a different context, and should be treated
165  // as a separate instance
166  if (isset($page['MPvar'])) {
167  $collectionPrefix .= '_MP_' . str_replace(',', '', $page['MPvar']);
168  }
169  $pageCollection->addNamePrefix($collectionPrefix . '_');
170  $fullCollection->addCollection($pageCollection);
171  // set default route flag after all routes have been processed
172  $defaultRouteForPage->setOption('_isDefault', true);
173  }
174 
175  $matcher = new ‪PageUriMatcher($fullCollection);
176  try {
177  $result = $matcher->match($prefixedUrlPath);
179  $matchedRoute = $fullCollection->get($result['_route']);
180  // Only use route if page language variant matches current language, otherwise handle it as route not found.
181  if ($this->‪isRouteReallyValidForLanguage($matchedRoute, $language)) {
182  return $this->‪buildPageArguments($matchedRoute, $result, $request->getQueryParams());
183  }
184  } catch (ResourceNotFoundException $e) {
185  if (str_ends_with($prefixedUrlPath, '/')) {
186  // Second try, look for /my-page even though the request was called via /my-page/ and the slash
187  // was not part of the slug, but let's then check again
188  try {
189  $result = $matcher->match(rtrim($prefixedUrlPath, '/'));
191  $matchedRoute = $fullCollection->get($result['_route']);
192  // Only use route if page language variant matches current language, otherwise
193  // handle it as route not found.
194  if ($this->‪isRouteReallyValidForLanguage($matchedRoute, $language)) {
195  return $this->‪buildPageArguments($matchedRoute, $result, $request->getQueryParams());
196  }
197  } catch (ResourceNotFoundException $e) {
198  // Do nothing
199  }
200  } else {
201  // Second try, look for /my-page/ even though the request was called via /my-page and the slash
202  // was part of the slug, but let's then check again
203  try {
204  $result = $matcher->match($prefixedUrlPath . '/');
206  $matchedRoute = $fullCollection->get($result['_route']);
207  // Only use route if page language variant matches current language, otherwise
208  // handle it as route not found.
209  if ($this->‪isRouteReallyValidForLanguage($matchedRoute, $language)) {
210  return $this->‪buildPageArguments($matchedRoute, $result, $request->getQueryParams());
211  }
212  } catch (ResourceNotFoundException $e) {
213  // Do nothing
214  }
215  }
216  }
217  throw new ‪RouteNotFoundException('No route found for path "' . $urlPath . '"', 1538389998);
218  }
219 
229  public function ‪generateUri($route, array $parameters = [], string $fragment = '', string $type = ''): UriInterface
230  {
231  // Resolve language
232  $language = null;
233  $languageOption = $parameters['_language'] ?? null;
234  unset($parameters['_language']);
235  if ($languageOption instanceof ‪SiteLanguage) {
236  $language = $languageOption;
237  } elseif ($languageOption !== null) {
238  $language = $this->site->getLanguageById((int)$languageOption);
239  }
240  if ($language === null) {
241  $language = $this->site->getDefaultLanguage();
242  }
243 
244  $pageId = 0;
245  if ($route instanceof Page) {
246  $pageId = $route->getPageId();
247  } elseif (is_array($route)) {
248  $pageId = (int)$route['uid'];
249  } elseif (is_scalar($route)) {
250  $pageId = (int)$route;
251  }
252 
255  $pageRepository = GeneralUtility::makeInstance(PageRepository::class, ‪$context);
256 
257  if ($route instanceof Page) {
258  $page = $route->toArray();
259  } elseif (is_array($route)
260  // Check 3rd party input $route for basic requirements
261  && isset($route['uid'], $route['sys_language_uid'], $route['l10n_parent'], $route['slug'])
262  && (int)$route['sys_language_uid'] === $language->getLanguageId()
263  && ((int)$route['l10n_parent'] === 0 || ($route['_PAGES_OVERLAY'] ?? false))
264  ) {
265  $page = $route;
266  } else {
267  $page = $pageRepository->getPage($pageId, true);
268  }
269  $pagePath = $page['slug'] ?? '';
270 
271  if ($parameters['MP'] ?? '') {
272  $mountPointPairs = explode(',', $parameters['MP']);
274  $pageId,
275  $pagePath,
276  $mountPointPairs,
277  $pageRepository
278  );
279  // If the MountPoint page has a different site, the link needs to be generated
280  // with the base of the MountPoint page, this is especially relevant for cross-domain linking
281  // Because the language contains the full base, it is retrieved in this case.
282  try {
283  [, $mountPointPage] = explode('-', (string)reset($mountPointPairs));
284  ‪$site = GeneralUtility::makeInstance(SiteMatcher::class)
285  ->matchByPageId((int)$mountPointPage);
286  $language = ‪$site->‪getLanguageById($language->getLanguageId());
287  } catch (SiteNotFoundException $e) {
288  // No alternative site found, use the existing one
289  }
290  // Store the MP parameter in the page record, so it could be used for any enhancers
291  $page['MPvar'] = $parameters['MP'];
292  unset($parameters['MP']);
293  }
294 
295  $originalParameters = $parameters;
296  $collection = new RouteCollection();
297  $defaultRouteForPage = new Route(
298  '/' . ltrim($pagePath, '/'),
299  [],
300  [],
301  ['utf8' => true, '_page' => $page]
302  );
303  $collection->add('default', $defaultRouteForPage);
304 
305  // cHash is never considered because cHash is built by this very method.
306  unset($originalParameters['cHash']);
307  $enhancers = $this->‪getEnhancersForPage($pageId, $language);
308  foreach ($enhancers as $enhancer) {
309  if ($enhancer instanceof RoutingEnhancerInterface) {
310  $enhancer->enhanceForGeneration($collection, $originalParameters);
311  }
312  }
313  foreach ($enhancers as $enhancer) {
314  if ($enhancer instanceof DecoratingEnhancerInterface) {
315  $enhancer->decorateForGeneration($collection, $originalParameters);
316  }
317  }
318 
319  $mappableProcessor = new MappableProcessor();
320  $requestContext = $this->requestContextFactory->fromSiteLanguage($language);
321  $generator = new UrlGenerator($collection, $requestContext);
322  $generator->injectMappableProcessor($mappableProcessor);
323  // set default route flag after all routes have been processed
324  $defaultRouteForPage->setOption('_isDefault', true);
325  $allRoutes = GeneralUtility::makeInstance(RouteSorter::class)
326  ->withRoutes($collection->all())
327  ->withOriginalParameters($originalParameters)
328  ->sortRoutesForGeneration()
329  ->getRoutes();
330  $matchedRoute = null;
331  $pageRouteResult = null;
332  $uri = null;
333  // map our reference type to symfony's custom paths
334  $referenceType = $type === static::ABSOLUTE_PATH ? UrlGenerator::ABSOLUTE_PATH : UrlGenerator::ABSOLUTE_URL;
339  foreach ($allRoutes as $routeName => $route) {
340  try {
341  $parameters = $originalParameters;
342  if ($route->hasOption('deflatedParameters')) {
343  $parameters = $route->getOption('deflatedParameters');
344  }
345  $mappableProcessor->generate($route, $parameters);
346  // ABSOLUTE_URL is used as default fallback
347  $urlAsString = $generator->generate($routeName, $parameters, $referenceType);
348  $uri = new Uri($urlAsString);
350  $matchedRoute = $collection->get($routeName);
351  // fetch potential applied defaults for later cHash generation
352  // (even if not applied in route, it will be exposed during resolving)
353  $appliedDefaults = $matchedRoute->getOption('_appliedDefaults') ?? [];
354  parse_str($uri->getQuery(), $remainingQueryParameters);
355  $enhancer = $route->getEnhancer();
356  if ($enhancer instanceof InflatableEnhancerInterface) {
357  $remainingQueryParameters = $enhancer->inflateParameters($remainingQueryParameters);
358  }
359  $pageRouteResult = $this->‪buildPageArguments($route, array_merge($appliedDefaults, $parameters), $remainingQueryParameters);
360  break;
361  } catch (MissingMandatoryParametersException $e) {
362  // no match
363  }
364  }
365 
366  if (!$uri instanceof UriInterface) {
367  throw new InvalidRouteArgumentsException('Uri could not be built for page "' . $pageId . '"', 1538390230);
368  }
369 
370  if ($pageRouteResult && $pageRouteResult->areDirty()) {
371  // for generating URLs this should(!) never happen
372  // if it does happen, generator logic has flaws
373  throw new InvalidRouteArgumentsException('Route arguments are dirty', 1537613247);
374  }
375 
376  if ($matchedRoute && $pageRouteResult && !empty($pageRouteResult->getDynamicArguments())) {
377  $cacheHash = $this->‪generateCacheHash($pageId, $pageRouteResult);
378 
379  $queryArguments = $pageRouteResult->getQueryArguments();
380  if (!empty($cacheHash)) {
381  $queryArguments['cHash'] = $cacheHash;
382  }
383  $uri = $uri->withQuery(http_build_query($queryArguments, '', '&', PHP_QUERY_RFC3986));
384  }
385  if ($fragment) {
386  $uri = $uri->withFragment($fragment);
387  }
388  return $uri;
389  }
390 
405  int $pageId,
406  string $pagePath,
407  array $mountPointPairs,
408  ‪PageRepository $pageRepository
409  ): string {
410  // Handle recursive mount points
411  $prefixesToRemove = [];
412  $slugPrefixesToAdd = [];
413  foreach ($mountPointPairs as $mountPointPair) {
414  [$mountRoot, $mountedPage] = GeneralUtility::intExplode('-', (string)$mountPointPair);
415  $mountPageInformation = $pageRepository->‪getMountPointInfo($mountedPage);
416  if ($mountPageInformation) {
417  if ($pageId === $mountedPage) {
418  continue;
419  }
420  // Get slugs in the translated page
421  $mountedPage = $pageRepository->‪getPage($mountedPage);
422  $mountRoot = $pageRepository->‪getPage($mountRoot);
423  $slugPrefix = $mountedPage['slug'] ?? '';
424  if ($slugPrefix === '/') {
425  $slugPrefix = '';
426  }
427  $prefixToRemove = $mountRoot['slug'] ?? '';
428  if ($prefixToRemove === '/') {
429  $prefixToRemove = '';
430  }
431  $prefixesToRemove[] = $prefixToRemove;
432  $slugPrefixesToAdd[] = $slugPrefix;
433  }
434  }
435  $slugPrefixesToAdd = array_reverse($slugPrefixesToAdd);
436  $prefixesToRemove = array_reverse($prefixesToRemove);
437  foreach ($prefixesToRemove as $prefixToRemove) {
438  // Slug prefixes are taken from the beginning of the array, where as the parts to be removed
439  // Are taken from the end.
440  $replacement = array_shift($slugPrefixesToAdd);
441  if ($prefixToRemove !== '' && str_starts_with($pagePath, $prefixToRemove)) {
442  $pagePath = substr($pagePath, strlen($prefixToRemove));
443  }
444  $pagePath = $replacement . ($pagePath !== '/' ? '/' . ltrim($pagePath, '/') : '');
445  }
446  return $pagePath;
447  }
448 
455  protected function ‪getEnhancersForPage(int $pageId, ‪SiteLanguage $language): array
456  {
457  $enhancers = [];
458  foreach ($this->site->getConfiguration()['routeEnhancers'] ?? [] as $enhancerConfiguration) {
459  // Check if there is a restriction to page Ids.
460  if (is_array($enhancerConfiguration['limitToPages'] ?? null) && !in_array($pageId, $enhancerConfiguration['limitToPages'])) {
461  continue;
462  }
463  $enhancerType = $enhancerConfiguration['type'] ?? '';
464  $enhancer = $this->enhancerFactory->create($enhancerType, $enhancerConfiguration);
465  if (!empty($enhancerConfiguration['aspects'] ?? null)) {
466  $aspects = $this->aspectFactory->createAspects(
467  $enhancerConfiguration['aspects'],
468  $language,
469  $this->site
470  );
471  $enhancer->setAspects($aspects);
472  }
473  $enhancers[] = $enhancer;
474  }
475  return $enhancers;
476  }
477 
478  protected function ‪generateCacheHash(int $pageId, ‪PageArguments $arguments): string
479  {
480  return $this->cacheHashCalculator->calculateCacheHash(
481  $this->‪getCacheHashParameters($pageId, $arguments)
482  );
483  }
484 
485  protected function ‪getCacheHashParameters(int $pageId, ‪PageArguments $arguments): array
486  {
487  $hashParameters = $arguments->getDynamicArguments();
488  $hashParameters['id'] = $pageId;
489  $uri = http_build_query($hashParameters, '', '&', PHP_QUERY_RFC3986);
490  return $this->cacheHashCalculator->getRelevantParameters($uri);
491  }
492 
509  protected function ‪buildPageArguments(‪Route $route, array $results, array $remainingQueryParameters = []): ‪PageArguments
510  {
511  // only use parameters that actually have been processed
512  // (thus stripping internals like _route, _controller, ...)
513  $routeArguments = $this->‪filterProcessedParameters($route, $results);
514  // assert amount of "static" mappers is not too "dynamic"
515  $this->‪assertMaximumStaticMappableAmount($route, array_keys($routeArguments));
516  // delegate result handling to enhancer
517  $enhancer = $route->‪getEnhancer();
518  if ($enhancer instanceof ‪ResultingInterface) {
519  // forward complete(!) results, not just filtered parameters
520  return $enhancer->buildResult($route, $results, $remainingQueryParameters);
521  }
522  $page = $route->getOption('_page');
523  if ((int)($page['l10n_parent'] ?? 0) > 0) {
524  $pageId = (int)$page['l10n_parent'];
525  } elseif ((int)($page['t3ver_oid'] ?? 0) > 0) {
526  $pageId = (int)$page['t3ver_oid'];
527  } else {
528  $pageId = (int)($page['uid'] ?? 0);
529  }
530  $type = $this->‪resolveType($route, $remainingQueryParameters);
531  // See PageSlugCandidateProvider where this is added.
532  if ($page['MPvar'] ?? '') {
533  $routeArguments['MP'] = $page['MPvar'];
534  }
535  return new ‪PageArguments($pageId, $type, $routeArguments, [], $remainingQueryParameters);
536  }
537 
543  protected function ‪resolveType(‪Route $route, array &$remainingQueryParameters): string
544  {
545  $type = $remainingQueryParameters['type'] ?? 0;
546  $decoratedParameters = $route->getOption('_decoratedParameters');
547  if (isset($decoratedParameters['type'])) {
548  $type = $decoratedParameters['type'];
549  unset($decoratedParameters['type']);
550  $remainingQueryParameters = array_replace_recursive(
551  $remainingQueryParameters,
552  $decoratedParameters
553  );
554  }
555  return (string)$type;
556  }
557 
565  protected function ‪assertMaximumStaticMappableAmount(‪Route $route, array $variableNames = [])
566  {
567  // empty when only values of route defaults where used
568  if (empty($variableNames)) {
569  return;
570  }
571  $mappers = $route->‪filterAspects(
572  [StaticMappableAspectInterface::class, \Countable::class],
573  $variableNames
574  );
575  if (empty($mappers)) {
576  return;
577  }
578 
579  $multipliers = array_map('count', $mappers);
580  $product = array_product($multipliers);
581  if ($product > 10000) {
582  throw new \OverflowException(
583  'Possible range of all mappers is larger than 10000 items',
584  1537696772
585  );
586  }
587  }
588 
594  protected function ‪filterProcessedParameters(‪Route $route, $results): array
595  {
596  return array_intersect_key(
597  $results,
598  array_flip($route->compile()->getPathVariables())
599  );
600  }
601 
603  {
604  return GeneralUtility::makeInstance(
605  PageSlugCandidateProvider::class,
606  ‪$context,
607  $this->site,
608  $this->enhancerFactory
609  );
610  }
611 
620  protected function ‪isRouteReallyValidForLanguage(‪Route $route, ‪SiteLanguage $siteLanguage): bool
621  {
622  $page = $route->getOption('_page');
623  $languageIdField = ‪$GLOBALS['TCA']['pages']['ctrl']['languageField'] ?? '';
624  if ($languageIdField === '') {
625  return true;
626  }
627  $languageId = (int)($page[$languageIdField] ?? 0);
628  if ($siteLanguage->‪getLanguageId() === 0 || $siteLanguage->‪getLanguageId() === $languageId) {
629  // default language site request or if page record is same language then siteLanguage, page record
630  // is valid to use as page resolving candidate and need no further overlay checks.
631  return true;
632  }
633  $pageIdInDefaultLanguage = (int)($languageId > 0 ? $page['l10n_parent'] : $page['uid']);
634  $pageRepository = GeneralUtility::makeInstance(PageRepository::class, $this->context);
635  $localizedPage = $pageRepository->getPageOverlay($pageIdInDefaultLanguage, $siteLanguage->‪getLanguageId());
636  if (!$localizedPage) {
637  // no page language overlay found, which means that either language page is not published and no logged
638  // in backend user OR there is no language overlay for that page at all. Thus using page record to build
639  // as page resolving candidate is valid.
640  return true;
641  }
642  // we found a valid page overlay, which means that current record is not the valid page for the current
643  // siteLanguage. To avoid resolving page with multiple slugs for a siteLanguage path, we flag this invalid.
644  return false;
645  }
646 }
‪TYPO3\CMS\Core\Domain\Page
Definition: Page.php:24
‪TYPO3\CMS\Core\Routing\PageArguments
Definition: PageArguments.php:26
‪TYPO3\CMS\Core\Routing\Enhancer\EnhancerFactory
Definition: EnhancerFactory.php:26
‪TYPO3\CMS\Core\Context\LanguageAspectFactory
Definition: LanguageAspectFactory.php:27
‪TYPO3\CMS\Core\Routing\RouterInterface
Definition: RouterInterface.php:28
‪TYPO3\CMS\Core\Routing\PageSlugCandidateProvider
Definition: PageSlugCandidateProvider.php:43
‪TYPO3\CMS\Core\Routing\PageRouter\$context
‪Context $context
Definition: PageRouter.php:75
‪TYPO3\CMS\Core\Routing\Enhancer\RoutingEnhancerInterface
Definition: RoutingEnhancerInterface.php:26
‪TYPO3\CMS\Core\Routing\RouteResultInterface
Definition: RouteResultInterface.php:23
‪TYPO3\CMS\Core\Routing\PageUriMatcher
Definition: PageUriMatcher.php:33
‪TYPO3\CMS\Core\Routing\PageRouter\generateCacheHash
‪generateCacheHash(int $pageId, PageArguments $arguments)
Definition: PageRouter.php:478
‪TYPO3\CMS\Core\Routing\RouteCollection
Definition: RouteCollection.php:30
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\getPage
‪array getPage($uid, $disableGroupAccessCheck=false)
Definition: PageRepository.php:246
‪TYPO3\CMS\Core\Context\LanguageAspectFactory\createFromSiteLanguage
‪static createFromSiteLanguage(SiteLanguage $language)
Definition: LanguageAspectFactory.php:31
‪TYPO3\CMS\Core\Exception\SiteNotFoundException
Definition: SiteNotFoundException.php:25
‪TYPO3\CMS\Core\Routing\PageRouter
Definition: PageRouter.php:70
‪TYPO3\CMS\Core\Routing\PageRouter\filterProcessedParameters
‪filterProcessedParameters(Route $route, $results)
Definition: PageRouter.php:594
‪TYPO3\CMS\Core\Routing\Route\getEnhancer
‪getEnhancer()
Definition: Route.php:65
‪TYPO3\CMS\Core\Routing
‪TYPO3\CMS\Core\Routing\RouteNotFoundException
Definition: RouteNotFoundException.php:25
‪TYPO3\CMS\Core\Routing\PageRouter\getCacheHashParameters
‪getCacheHashParameters(int $pageId, PageArguments $arguments)
Definition: PageRouter.php:485
‪TYPO3\CMS\Core\Routing\Enhancer\ResultingInterface
Definition: ResultingInterface.php:28
‪TYPO3\CMS\Core\Context\Context
Definition: Context.php:54
‪TYPO3\CMS\Core\Http\Uri
Definition: Uri.php:30
‪TYPO3\CMS\Core\Context\Context\setAspect
‪setAspect(string $name, AspectInterface $aspect)
Definition: Context.php:138
‪TYPO3\CMS\Core\Site\Entity\Site
Definition: Site.php:42
‪TYPO3\CMS\Core\Site\Entity\SiteLanguage
Definition: SiteLanguage.php:27
‪TYPO3\CMS\Core\Routing\PageRouter\isRouteReallyValidForLanguage
‪isRouteReallyValidForLanguage(Route $route, SiteLanguage $siteLanguage)
Definition: PageRouter.php:620
‪TYPO3\CMS\Core\Routing\PageRouter\$site
‪Site $site
Definition: PageRouter.php:71
‪TYPO3\CMS\Core\Routing\PageRouter\$enhancerFactory
‪EnhancerFactory $enhancerFactory
Definition: PageRouter.php:72
‪TYPO3\CMS\Core\Site\Entity\SiteLanguage\getLanguageId
‪getLanguageId()
Definition: SiteLanguage.php:169
‪TYPO3\CMS\Core\Routing\PageRouter\assertMaximumStaticMappableAmount
‪assertMaximumStaticMappableAmount(Route $route, array $variableNames=[])
Definition: PageRouter.php:565
‪TYPO3\CMS\Core\Routing\PageRouter\getEnhancersForPage
‪EnhancerInterface[] getEnhancersForPage(int $pageId, SiteLanguage $language)
Definition: PageRouter.php:455
‪TYPO3\CMS\Core\Routing\PageRouter\resolveMountPointParameterIntoPageSlug
‪resolveMountPointParameterIntoPageSlug(int $pageId, string $pagePath, array $mountPointPairs, PageRepository $pageRepository)
Definition: PageRouter.php:404
‪TYPO3\CMS\Core\Routing\PageRouter\resolveType
‪resolveType(Route $route, array &$remainingQueryParameters)
Definition: PageRouter.php:543
‪TYPO3\CMS\Core\Routing\PageRouter\$aspectFactory
‪AspectFactory $aspectFactory
Definition: PageRouter.php:73
‪TYPO3\CMS\Core\Routing\PageRouter\getSlugCandidateProvider
‪getSlugCandidateProvider(Context $context)
Definition: PageRouter.php:602
‪TYPO3\CMS\Core\Routing\Aspect\MappableProcessor
Definition: MappableProcessor.php:26
‪TYPO3\CMS\Core\Routing\PageRouter\$cacheHashCalculator
‪CacheHashCalculator $cacheHashCalculator
Definition: PageRouter.php:74
‪TYPO3\CMS\Core\Routing\PageRouter\__construct
‪__construct(Site $site, Context $context=null)
Definition: PageRouter.php:81
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Core\Routing\Route
Definition: Route.php:32
‪TYPO3\CMS\Frontend\Page\CacheHashCalculator
Definition: CacheHashCalculator.php:25
‪TYPO3\CMS\Core\Routing\Aspect\StaticMappableAspectInterface
Definition: StaticMappableAspectInterface.php:23
‪TYPO3\CMS\Core\Routing\Aspect\AspectFactory
Definition: AspectFactory.php:32
‪TYPO3\CMS\Core\Routing\Enhancer\InflatableEnhancerInterface
Definition: InflatableEnhancerInterface.php:24
‪TYPO3\CMS\Core\Routing\PageRouter\buildPageArguments
‪buildPageArguments(Route $route, array $results, array $remainingQueryParameters=[])
Definition: PageRouter.php:509
‪TYPO3\CMS\Core\Domain\Repository\PageRepository
Definition: PageRepository.php:61
‪TYPO3\CMS\Core\Routing\RouterInterface\generateUri
‪generateUri($route, array $parameters=[], string $fragment='', string $type=self::ABSOLUTE_URL)
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:51
‪TYPO3\CMS\Core\Routing\PageRouter\matchRequest
‪RouteResultInterface PageArguments matchRequest(ServerRequestInterface $request, RouteResultInterface $previousResult=null)
Definition: PageRouter.php:98
‪TYPO3\CMS\Core\Routing\Route\filterAspects
‪AspectInterface[] filterAspects(array $classNames, array $variableNames=[])
Definition: Route.php:158
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\getMountPointInfo
‪mixed getMountPointInfo($pageId, $pageRec=false, $prevMountPids=[], $firstPageUid=0)
Definition: PageRepository.php:1215
‪TYPO3\CMS\Core\Routing\PageRouter\$requestContextFactory
‪RequestContextFactory $requestContextFactory
Definition: PageRouter.php:76
‪TYPO3\CMS\Core\Routing\Enhancer\DecoratingEnhancerInterface
Definition: DecoratingEnhancerInterface.php:26
‪TYPO3\CMS\Core\Routing\Enhancer\EnhancerInterface
Definition: EnhancerInterface.php:27
‪TYPO3\CMS\Core\Site\Entity\SiteInterface\getLanguageById
‪getLanguageById(int $languageId)
‪TYPO3\CMS\Core\Routing\RequestContextFactory
Definition: RequestContextFactory.php:30