‪TYPO3CMS  11.5
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;
24 use Symfony\Component\Routing\RequestContext;
44 
71 {
75  protected ‪$site;
76 
80  protected ‪$enhancerFactory;
81 
85  protected ‪$aspectFactory;
86 
91 
95  protected ‪$context;
96 
103  public function ‪__construct(‪Site ‪$site, ‪Context ‪$context = null)
104  {
105  $this->site = ‪$site;
106  $this->context = ‪$context ?? GeneralUtility::makeInstance(Context::class);
107  $this->enhancerFactory = GeneralUtility::makeInstance(EnhancerFactory::class);
108  $this->aspectFactory = GeneralUtility::makeInstance(AspectFactory::class, $this->context);
109  $this->cacheHashCalculator = GeneralUtility::makeInstance(CacheHashCalculator::class);
110  }
111 
120  public function ‪matchRequest(ServerRequestInterface $request, ‪RouteResultInterface $previousResult = null): ‪RouteResultInterface
121  {
122  if (!($previousResult instanceof ‪RouteResultInterface)) {
123  throw new ‪RouteNotFoundException('No previous result given. Cannot find a page for an empty route part', 1555303496);
124  }
125 
126  $candidateProvider = $this->‪getSlugCandidateProvider($this->context);
127 
128  // Legacy URIs (?id=12345) takes precedence, no matter if a route is given
129  $requestId = (int)($request->getQueryParams()['id'] ?? 0);
130  if ($requestId > 0) {
131  if (!empty($pageId = $candidateProvider->getRealPageIdForPageIdAsPossibleCandidate($requestId))) {
132  return new PageArguments(
133  (int)$pageId,
134  (string)($request->getQueryParams()['type'] ?? '0'),
135  [],
136  [],
137  $request->getQueryParams()
138  );
139  }
140  throw new RouteNotFoundException('The requested page does not exist.', 1557839801);
141  }
142 
143  $urlPath = $previousResult->getTail();
144  $language = $previousResult->getLanguage();
145  // Keep possible existing "/" at the end (no trim, just ltrim), even though the page slug might not
146  // contain a "/" at the end. This way we find page candidates where pages MIGHT have a trailing slash
147  // and pages with slugs that do not have a trailing slash
148  // $pageCandidates will contain more records than expected, which is important here, as the ->match() method
149  // will handle this then.
150  // The prepended slash will ensure that the root page of the site tree will also be fetched
151  $prefixedUrlPath = '/' . ltrim($urlPath, '/');
152 
153  $pageCandidates = $candidateProvider->getCandidatesForPath($prefixedUrlPath, $language);
154 
155  // Stop if there are no candidates
156  if (empty($pageCandidates)) {
157  throw new RouteNotFoundException('No page candidates found for path "' . $prefixedUrlPath . '"', 1538389999);
158  }
159 
161  $fullCollection = new RouteCollection();
162  foreach ($pageCandidates ?? [] as $page) {
163  $pageIdForDefaultLanguage = (int)($page['l10n_parent'] ?: $page['uid']);
164  $pagePath = $page['slug'];
165  $pageCollection = new RouteCollection();
166  $defaultRouteForPage = new Route(
167  $pagePath,
168  [],
169  [],
170  ['utf8' => true, '_page' => $page]
171  );
172  $pageCollection->add('default', $defaultRouteForPage);
173  $enhancers = $this->‪getEnhancersForPage($pageIdForDefaultLanguage, $language);
174  foreach ($enhancers as $enhancer) {
175  if ($enhancer instanceof DecoratingEnhancerInterface) {
176  $enhancer->decorateForMatching($pageCollection, $urlPath);
177  }
178  }
179  foreach ($enhancers as $enhancer) {
180  if ($enhancer instanceof RoutingEnhancerInterface) {
181  $enhancer->enhanceForMatching($pageCollection);
182  }
183  }
184 
185  $collectionPrefix = 'page_' . $page['uid'];
186  // Pages with a MountPoint Parameter means that they have a different context, and should be treated
187  // as a separate instance
188  if (isset($page['MPvar'])) {
189  $collectionPrefix .= '_MP_' . str_replace(',', '', $page['MPvar']);
190  }
191  $pageCollection->addNamePrefix($collectionPrefix . '_');
192  $fullCollection->addCollection($pageCollection);
193  // set default route flag after all routes have been processed
194  $defaultRouteForPage->setOption('_isDefault', true);
195  }
196 
197  $matcher = new PageUriMatcher($fullCollection);
198  try {
199  $result = $matcher->match($prefixedUrlPath);
201  $matchedRoute = $fullCollection->get($result['_route']);
202  // Only use route if page language variant matches current language, otherwise handle it as route not found.
203  if ($this->‪isRouteReallyValidForLanguage($matchedRoute, $language)) {
204  return $this->‪buildPageArguments($matchedRoute, $result, $request->getQueryParams());
205  }
206  } catch (ResourceNotFoundException $e) {
207  if (str_ends_with($prefixedUrlPath, '/')) {
208  // Second try, look for /my-page even though the request was called via /my-page/ and the slash
209  // was not part of the slug, but let's then check again
210  try {
211  $result = $matcher->match(rtrim($prefixedUrlPath, '/'));
213  $matchedRoute = $fullCollection->get($result['_route']);
214  // Only use route if page language variant matches current language, otherwise
215  // handle it as route not found.
216  if ($this->‪isRouteReallyValidForLanguage($matchedRoute, $language)) {
217  return $this->‪buildPageArguments($matchedRoute, $result, $request->getQueryParams());
218  }
219  } catch (ResourceNotFoundException $e) {
220  // Do nothing
221  }
222  } else {
223  // Second try, look for /my-page/ even though the request was called via /my-page and the slash
224  // was part of the slug, but let's then check again
225  try {
226  $result = $matcher->match($prefixedUrlPath . '/');
228  $matchedRoute = $fullCollection->get($result['_route']);
229  // Only use route if page language variant matches current language, otherwise
230  // handle it as route not found.
231  if ($this->‪isRouteReallyValidForLanguage($matchedRoute, $language)) {
232  return $this->‪buildPageArguments($matchedRoute, $result, $request->getQueryParams());
233  }
234  } catch (ResourceNotFoundException $e) {
235  // Do nothing
236  }
237  }
238  }
239  throw new RouteNotFoundException('No route found for path "' . $urlPath . '"', 1538389998);
240  }
241 
252  public function ‪generateUri($route, array $parameters = [], string $fragment = '', string $type = ''): UriInterface
253  {
254  // Resolve language
255  $language = null;
256  $languageOption = $parameters['_language'] ?? null;
257  unset($parameters['_language']);
258  if ($languageOption instanceof SiteLanguage) {
259  $language = $languageOption;
260  } elseif ($languageOption !== null) {
261  $language = $this->site->getLanguageById((int)$languageOption);
262  }
263  if ($language === null) {
264  $language = $this->site->getDefaultLanguage();
265  }
266 
267  // Whether scheduled records should be considered
268  $includeScheduledRecords = (bool)($parameters['_includeScheduledRecords'] ?? false);
269  unset($parameters['_includeScheduledRecords']);
270 
271  $pageId = 0;
272  if ($route instanceof Page) {
273  $pageId = $route->getPageId();
274  } elseif (is_array($route)) {
275  $pageId = (int)$route['uid'];
276  } elseif (is_scalar($route)) {
277  $pageId = (int)$route;
278  }
279 
282  $pageRepository = GeneralUtility::makeInstance(PageRepository::class, ‪$context);
283  $pageRepository->includeScheduledRecords = $includeScheduledRecords;
284 
285  if ($route instanceof Page) {
286  $page = $route->toArray();
287  } elseif (is_array($route)
288  // Check 3rd party input $route for basic requirements
289  && isset($route['uid'], $route['sys_language_uid'], $route['l10n_parent'], $route['slug'])
290  && (int)$route['sys_language_uid'] === $language->getLanguageId()
291  && ((int)$route['l10n_parent'] === 0 || ($route['_PAGES_OVERLAY'] ?? false))
292  ) {
293  $page = $route;
294  } else {
295  $page = $pageRepository->getPage($pageId, true);
296  }
297  $pagePath = $page['slug'] ?? '';
298 
299  if ($parameters['MP'] ?? '') {
300  $mountPointPairs = explode(',', $parameters['MP']);
302  $pageId,
303  $pagePath,
304  $mountPointPairs,
305  $pageRepository
306  );
307  // If the MountPoint page has a different site, the link needs to be generated
308  // with the base of the MountPoint page, this is especially relevant for cross-domain linking
309  // Because the language contains the full base, it is retrieved in this case.
310  try {
311  [, $mountPointPage] = explode('-', (string)reset($mountPointPairs));
312  ‪$site = GeneralUtility::makeInstance(SiteMatcher::class)
313  ->matchByPageId((int)$mountPointPage);
314  $language = ‪$site->‪getLanguageById($language->getLanguageId());
315  } catch (SiteNotFoundException $e) {
316  // No alternative site found, use the existing one
317  }
318  // Store the MP parameter in the page record, so it could be used for any enhancers
319  $page['MPvar'] = $parameters['MP'];
320  unset($parameters['MP']);
321  }
322 
323  $originalParameters = $parameters;
324  $collection = new RouteCollection();
325  $defaultRouteForPage = new Route(
326  '/' . ltrim($pagePath, '/'),
327  [],
328  [],
329  ['utf8' => true, '_page' => $page]
330  );
331  $collection->add('default', $defaultRouteForPage);
332 
333  // cHash is never considered because cHash is built by this very method.
334  unset($originalParameters['cHash']);
335  $enhancers = $this->‪getEnhancersForPage($pageId, $language);
336  foreach ($enhancers as $enhancer) {
337  if ($enhancer instanceof RoutingEnhancerInterface) {
338  $enhancer->enhanceForGeneration($collection, $originalParameters);
339  }
340  }
341  foreach ($enhancers as $enhancer) {
342  if ($enhancer instanceof DecoratingEnhancerInterface) {
343  $enhancer->decorateForGeneration($collection, $originalParameters);
344  }
345  }
346 
347  $scheme = $language->getBase()->getScheme();
348  $mappableProcessor = new MappableProcessor();
349  ‪$context = new RequestContext(
350  // page segment (slug & enhanced part) is supposed to start with '/'
351  rtrim($language->getBase()->getPath(), '/'),
352  'GET',
353  $language->getBase()->getHost(),
354  $scheme ?: 'http',
355  $scheme === 'http' ? $language->getBase()->getPort() ?? 80 : 80,
356  $scheme === 'https' ? $language->getBase()->getPort() ?? 443 : 443
357  );
358  $generator = new UrlGenerator($collection, ‪$context);
359  $generator->injectMappableProcessor($mappableProcessor);
360  // set default route flag after all routes have been processed
361  $defaultRouteForPage->setOption('_isDefault', true);
362  $allRoutes = GeneralUtility::makeInstance(RouteSorter::class)
363  ->withRoutes($collection->all())
364  ->withOriginalParameters($originalParameters)
365  ->sortRoutesForGeneration()
366  ->getRoutes();
367  $matchedRoute = null;
368  $pageRouteResult = null;
369  $uri = null;
370  // map our reference type to symfony's custom paths
371  $referenceType = $type === static::ABSOLUTE_PATH ? UrlGenerator::ABSOLUTE_PATH : UrlGenerator::ABSOLUTE_URL;
376  foreach ($allRoutes as $routeName => $route) {
377  try {
378  $parameters = $originalParameters;
379  if ($route->hasOption('deflatedParameters')) {
380  $parameters = $route->getOption('deflatedParameters');
381  }
382  $mappableProcessor->generate($route, $parameters);
383  // ABSOLUTE_URL is used as default fallback
384  $urlAsString = $generator->generate($routeName, $parameters, $referenceType);
385  $uri = new Uri($urlAsString);
387  $matchedRoute = $collection->get($routeName);
388  // fetch potential applied defaults for later cHash generation
389  // (even if not applied in route, it will be exposed during resolving)
390  $appliedDefaults = $matchedRoute->getOption('_appliedDefaults') ?? [];
391  parse_str($uri->getQuery(), $remainingQueryParameters);
392  $enhancer = $route->getEnhancer();
393  if ($enhancer instanceof InflatableEnhancerInterface) {
394  $remainingQueryParameters = $enhancer->inflateParameters($remainingQueryParameters);
395  }
396  $pageRouteResult = $this->‪buildPageArguments($route, array_merge($appliedDefaults, $parameters), $remainingQueryParameters);
397  break;
398  } catch (MissingMandatoryParametersException $e) {
399  // no match
400  }
401  }
402 
403  if (!$uri instanceof UriInterface) {
404  throw new InvalidRouteArgumentsException('Uri could not be built for page "' . $pageId . '"', 1538390230);
405  }
406 
407  if ($pageRouteResult && $pageRouteResult->areDirty()) {
408  // for generating URLs this should(!) never happen
409  // if it does happen, generator logic has flaws
410  throw new InvalidRouteArgumentsException('Route arguments are dirty', 1537613247);
411  }
412 
413  if ($matchedRoute && $pageRouteResult && !empty($pageRouteResult->getDynamicArguments())) {
414  $cacheHash = $this->‪generateCacheHash($pageId, $pageRouteResult);
415 
416  $queryArguments = $pageRouteResult->getQueryArguments();
417  if (!empty($cacheHash)) {
418  $queryArguments['cHash'] = $cacheHash;
419  }
420  $uri = $uri->withQuery(http_build_query($queryArguments, '', '&', PHP_QUERY_RFC3986));
421  }
422  if ($fragment) {
423  $uri = $uri->withFragment($fragment);
424  }
425  return $uri;
426  }
427 
443  int $pageId,
444  string $pagePath,
445  array $mountPointPairs,
446  PageRepository $pageRepository
447  ): string {
448  // Handle recursive mount points
449  $prefixesToRemove = [];
450  $slugPrefixesToAdd = [];
451  foreach ($mountPointPairs as $mountPointPair) {
452  [$mountRoot, $mountedPage] = ‪GeneralUtility::intExplode('-', $mountPointPair);
453  $mountPageInformation = $pageRepository->getMountPointInfo($mountedPage);
454  if ($mountPageInformation) {
455  if ($pageId === $mountedPage) {
456  continue;
457  }
458  // Get slugs in the translated page
459  $mountedPage = $pageRepository->getPage($mountedPage);
460  $mountRoot = $pageRepository->getPage($mountRoot);
461  $slugPrefix = $mountedPage['slug'] ?? '';
462  if ($slugPrefix === '/') {
463  $slugPrefix = '';
464  }
465  $prefixToRemove = $mountRoot['slug'] ?? '';
466  if ($prefixToRemove === '/') {
467  $prefixToRemove = '';
468  }
469  $prefixesToRemove[] = $prefixToRemove;
470  $slugPrefixesToAdd[] = $slugPrefix;
471  }
472  }
473  $slugPrefixesToAdd = array_reverse($slugPrefixesToAdd);
474  $prefixesToRemove = array_reverse($prefixesToRemove);
475  foreach ($prefixesToRemove as $prefixToRemove) {
476  // Slug prefixes are taken from the beginning of the array, where as the parts to be removed
477  // Are taken from the end.
478  $replacement = array_shift($slugPrefixesToAdd);
479  if ($prefixToRemove !== '' && strpos($pagePath, $prefixToRemove) === 0) {
480  $pagePath = substr($pagePath, strlen($prefixToRemove));
481  }
482  $pagePath = $replacement . ($pagePath !== '/' ? '/' . ltrim($pagePath, '/') : '');
483  }
484  return $pagePath;
485  }
486 
495  protected function ‪getEnhancersForPage(int $pageId, SiteLanguage $language): array
496  {
497  $enhancers = [];
498  foreach ($this->site->getConfiguration()['routeEnhancers'] ?? [] as $enhancerConfiguration) {
499  // Check if there is a restriction to page Ids.
500  if (is_array($enhancerConfiguration['limitToPages'] ?? null) && !in_array($pageId, $enhancerConfiguration['limitToPages'])) {
501  continue;
502  }
503  $enhancerType = $enhancerConfiguration['type'] ?? '';
504  $enhancer = $this->enhancerFactory->create($enhancerType, $enhancerConfiguration);
505  if (!empty($enhancerConfiguration['aspects'] ?? null)) {
506  $aspects = $this->aspectFactory->createAspects(
507  $enhancerConfiguration['aspects'],
508  $language,
509  $this->site
510  );
511  $enhancer->setAspects($aspects);
512  }
513  $enhancers[] = $enhancer;
514  }
515  return $enhancers;
516  }
517 
523  protected function ‪generateCacheHash(int $pageId, PageArguments $arguments): string
524  {
525  return $this->cacheHashCalculator->calculateCacheHash(
526  $this->‪getCacheHashParameters($pageId, $arguments)
527  );
528  }
529 
535  protected function ‪getCacheHashParameters(int $pageId, PageArguments $arguments): array
536  {
537  $hashParameters = $arguments->getDynamicArguments();
538  $hashParameters['id'] = $pageId;
539  $uri = http_build_query($hashParameters, '', '&', PHP_QUERY_RFC3986);
540  return $this->cacheHashCalculator->getRelevantParameters($uri);
541  }
542 
560  protected function ‪buildPageArguments(Route $route, array $results, array $remainingQueryParameters = []): PageArguments
561  {
562  // only use parameters that actually have been processed
563  // (thus stripping internals like _route, _controller, ...)
564  $routeArguments = $this->‪filterProcessedParameters($route, $results);
565  // assert amount of "static" mappers is not too "dynamic"
566  $this->‪assertMaximumStaticMappableAmount($route, array_keys($routeArguments));
567  // delegate result handling to enhancer
568  $enhancer = $route->getEnhancer();
569  if ($enhancer instanceof ResultingInterface) {
570  // forward complete(!) results, not just filtered parameters
571  return $enhancer->buildResult($route, $results, $remainingQueryParameters);
572  }
573  $page = $route->getOption('_page');
574  if ((int)($page['l10n_parent'] ?? 0) > 0) {
575  $pageId = (int)$page['l10n_parent'];
576  } elseif ((int)($page['t3ver_oid'] ?? 0) > 0) {
577  $pageId = (int)$page['t3ver_oid'];
578  } else {
579  $pageId = (int)($page['uid'] ?? 0);
580  }
581  $type = $this->‪resolveType($route, $remainingQueryParameters);
582  // See PageSlugCandidateProvider where this is added.
583  if ($page['MPvar'] ?? '') {
584  $routeArguments['MP'] = $page['MPvar'];
585  }
586  return new PageArguments($pageId, $type, $routeArguments, [], $remainingQueryParameters);
587  }
588 
596  protected function ‪resolveType(Route $route, array &$remainingQueryParameters): string
597  {
598  $type = $remainingQueryParameters['type'] ?? 0;
599  $decoratedParameters = $route->getOption('_decoratedParameters');
600  if (isset($decoratedParameters['type'])) {
601  $type = $decoratedParameters['type'];
602  unset($decoratedParameters['type']);
603  $remainingQueryParameters = array_replace_recursive(
604  $remainingQueryParameters,
605  $decoratedParameters
606  );
607  }
608  return (string)$type;
609  }
610 
620  protected function ‪assertMaximumStaticMappableAmount(Route $route, array $variableNames = [])
621  {
622  // empty when only values of route defaults where used
623  if (empty($variableNames)) {
624  return;
625  }
626  $mappers = $route->filterAspects(
627  [StaticMappableAspectInterface::class, \Countable::class],
628  $variableNames
629  );
630  if (empty($mappers)) {
631  return;
632  }
633 
634  $multipliers = array_map('count', $mappers);
635  $product = array_product($multipliers);
636  if ($product > 10000) {
637  throw new \OverflowException(
638  'Possible range of all mappers is larger than 10000 items',
639  1537696772
640  );
641  }
642  }
643 
651  protected function ‪filterProcessedParameters(Route $route, $results): array
652  {
653  return array_intersect_key(
654  $results,
655  array_flip($route->compile()->getPathVariables())
656  );
657  }
658 
660  {
661  return GeneralUtility::makeInstance(
662  PageSlugCandidateProvider::class,
663  ‪$context,
664  $this->site,
665  $this->enhancerFactory
666  );
667  }
668 
677  protected function ‪isRouteReallyValidForLanguage(Route $route, SiteLanguage $siteLanguage): bool
678  {
679  $page = $route->getOption('_page');
680  $languageIdField = ‪$GLOBALS['TCA']['pages']['ctrl']['languageField'] ?? '';
681  if ($languageIdField === '') {
682  return true;
683  }
684  $languageId = (int)($page[$languageIdField] ?? 0);
685  if ($siteLanguage->getLanguageId() === 0 || $siteLanguage->getLanguageId() === $languageId) {
686  // default language site request or if page record is same language then siteLanguage, page record
687  // is valid to use as page resolving candidate and need no further overlay checks.
688  return true;
689  }
690  $pageIdInDefaultLanguage = (int)($languageId > 0 ? $page['l10n_parent'] : $page['uid']);
691  $pageRepository = GeneralUtility::makeInstance(PageRepository::class, $this->context);
692  $localizedPage = $pageRepository->getPageOverlay($pageIdInDefaultLanguage, $siteLanguage->getLanguageId());
693  if (!$localizedPage) {
694  // no page language overlay found, which means that either language page is not published and no logged
695  // in backend user OR there is no language overlay for that page at all. Thus using page record to build
696  // as page resolving candidate is valid.
697  return true;
698  }
699  // we found a valid page overlay, which means that current record is not the valid page for the current
700  // siteLanguage. To avoid resolving page with multiple slugs for a siteLanguage path, we flag this invalid.
701  return false;
702  }
703 }
‪TYPO3\CMS\Core\Site\Entity\SiteLanguage\getLanguageId
‪int getLanguageId()
Definition: SiteLanguage.php:198
‪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:42
‪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\RouteCollection
Definition: RouteCollection.php:27
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\getPage
‪array getPage($uid, $disableGroupAccessCheck=false)
Definition: PageRepository.php:255
‪TYPO3\CMS\Core\Exception\SiteNotFoundException
Definition: SiteNotFoundException.php:25
‪TYPO3\CMS\Core\Routing\PageRouter
Definition: PageRouter.php:71
‪TYPO3\CMS\Core\Context\LanguageAspectFactory\createFromSiteLanguage
‪static LanguageAspect createFromSiteLanguage(SiteLanguage $language)
Definition: LanguageAspectFactory.php:34
‪TYPO3\CMS\Core\Routing
‪TYPO3\CMS\Core\Routing\PageRouter\resolveMountPointParameterIntoPageSlug
‪string resolveMountPointParameterIntoPageSlug(int $pageId, string $pagePath, array $mountPointPairs, PageRepository $pageRepository)
Definition: PageRouter.php:437
‪TYPO3\CMS\Core\Routing\RouteNotFoundException
Definition: RouteNotFoundException.php:25
‪TYPO3\CMS\Core\Routing\Enhancer\ResultingInterface
Definition: ResultingInterface.php:28
‪TYPO3\CMS\Core\Context\Context
Definition: Context.php:53
‪TYPO3\CMS\Core\Routing\RouterInterface\generateUri
‪UriInterface generateUri($route, array $parameters=[], string $fragment='', string $type=self::ABSOLUTE_URL)
‪TYPO3\CMS\Core\Http\Uri
Definition: Uri.php:29
‪TYPO3\CMS\Core\Context\Context\setAspect
‪setAspect(string $name, AspectInterface $aspect)
Definition: Context.php:167
‪TYPO3\CMS\Core\Site\Entity\Site
Definition: Site.php:42
‪TYPO3\CMS\Core\Site\Entity\SiteLanguage
Definition: SiteLanguage.php:26
‪TYPO3\CMS\Core\Routing\PageRouter\getCacheHashParameters
‪array getCacheHashParameters(int $pageId, PageArguments $arguments)
Definition: PageRouter.php:530
‪TYPO3\CMS\Core\Routing\Route\getEnhancer
‪EnhancerInterface null getEnhancer()
Definition: Route.php:69
‪TYPO3\CMS\Core\Routing\PageRouter\$context
‪TYPO3 CMS Core Context Context $context
Definition: PageRouter.php:90
‪TYPO3\CMS\Core\Routing\PageRouter\isRouteReallyValidForLanguage
‪isRouteReallyValidForLanguage(Route $route, SiteLanguage $siteLanguage)
Definition: PageRouter.php:672
‪TYPO3\CMS\Core\Routing\PageRouter\filterProcessedParameters
‪array filterProcessedParameters(Route $route, $results)
Definition: PageRouter.php:646
‪TYPO3\CMS\Core\Routing\PageRouter\$site
‪Site $site
Definition: PageRouter.php:74
‪TYPO3\CMS\Core\Routing\PageRouter\buildPageArguments
‪PageArguments buildPageArguments(Route $route, array $results, array $remainingQueryParameters=[])
Definition: PageRouter.php:555
‪TYPO3\CMS\Core\Site\Entity\SiteInterface\getLanguageById
‪SiteLanguage getLanguageById(int $languageId)
‪TYPO3\CMS\Core\Routing\PageRouter\$enhancerFactory
‪EnhancerFactory $enhancerFactory
Definition: PageRouter.php:78
‪TYPO3\CMS\Core\Routing\PageRouter\assertMaximumStaticMappableAmount
‪assertMaximumStaticMappableAmount(Route $route, array $variableNames=[])
Definition: PageRouter.php:615
‪TYPO3\CMS\Core\Routing\PageRouter\getEnhancersForPage
‪EnhancerInterface[] getEnhancersForPage(int $pageId, SiteLanguage $language)
Definition: PageRouter.php:490
‪TYPO3\CMS\Core\Routing\PageRouter\$aspectFactory
‪AspectFactory $aspectFactory
Definition: PageRouter.php:82
‪TYPO3\CMS\Core\Routing\PageRouter\getSlugCandidateProvider
‪getSlugCandidateProvider(Context $context)
Definition: PageRouter.php:654
‪TYPO3\CMS\Core\Routing\Aspect\MappableProcessor
Definition: MappableProcessor.php:26
‪TYPO3\CMS\Core\Routing\PageRouter\$cacheHashCalculator
‪CacheHashCalculator $cacheHashCalculator
Definition: PageRouter.php:86
‪TYPO3\CMS\Core\Routing\PageRouter\__construct
‪__construct(Site $site, Context $context=null)
Definition: PageRouter.php:98
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Core\Routing\Route
Definition: Route.php:32
‪TYPO3\CMS\Core\Utility\GeneralUtility\intExplode
‪static int[] intExplode($delimiter, $string, $removeEmptyValues=false, $limit=0)
Definition: GeneralUtility.php:927
‪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:33
‪TYPO3\CMS\Core\Routing\Enhancer\InflatableEnhancerInterface
Definition: InflatableEnhancerInterface.php:24
‪TYPO3\CMS\Core\Domain\Repository\PageRepository
Definition: PageRepository.php:53
‪TYPO3\CMS\Core\Routing\PageRouter\resolveType
‪string resolveType(Route $route, array &$remainingQueryParameters)
Definition: PageRouter.php:591
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:50
‪TYPO3\CMS\Core\Routing\PageRouter\generateCacheHash
‪string generateCacheHash(int $pageId, PageArguments $arguments)
Definition: PageRouter.php:518
‪TYPO3\CMS\Core\Routing\PageRouter\matchRequest
‪RouteResultInterface PageArguments matchRequest(ServerRequestInterface $request, RouteResultInterface $previousResult=null)
Definition: PageRouter.php:115
‪TYPO3\CMS\Core\Routing\Route\filterAspects
‪AspectInterface[] filterAspects(array $classNames, array $variableNames=[])
Definition: Route.php:163
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\getMountPointInfo
‪mixed getMountPointInfo($pageId, $pageRec=false, $prevMountPids=[], $firstPageUid=0)
Definition: PageRepository.php:1194
‪TYPO3\CMS\Core\Routing\Enhancer\DecoratingEnhancerInterface
Definition: DecoratingEnhancerInterface.php:26
‪TYPO3\CMS\Core\Routing\Enhancer\EnhancerInterface
Definition: EnhancerInterface.php:27