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