[FEATURE] Add "Pseudo" Site functionality 67/57767/22
authorBenni Mack <benni@typo3.org>
Wed, 1 Aug 2018 20:44:58 +0000 (22:44 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 21 Aug 2018 18:33:24 +0000 (20:33 +0200)
commitfe7ab8a88b18c1e106e334bad60ba442598ed534
tree4a9035b49396678b6c1ff13ae1c38943b41d4c86
parentd5f6199001fbfb798b8cc68a5b7cad09a068f8ad
[FEATURE] Add "Pseudo" Site functionality

All pages on rootlevel or with "is-siteroot" need
to have a site object as well, but populated
by sys_domain (optional) and all available sys_language
records.

However, this information needs to be compiled
within an entity called "PseudoSite".

This way, the page-based routing ("slug handling")
can use the functionality to detect the uniqueness
of a slug within a page tree.

The routing of sites is moved to a "SiteMatcher" API
class, returning all found information on a request
for a site, also encapsulating the Symfony/Routing
component in there.

This would be exactly the step where further information
about a URL will then be resolved.

Next steps are the usage of Sites and PseudoSites
in TYPO3 Backend, allowing to only show e.g.
languages that are configured, which can be done
via $site->getAvailableLanguages().

Resolves: #85900
Releases: master
Change-Id: Ia2d27e58f21b5c89dc67dffcbc82d6612b350988
Reviewed-on: https://review.typo3.org/57767
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
12 files changed:
typo3/sysext/backend/Classes/Middleware/SiteResolver.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/core/Classes/Routing/SiteMatcher.php [new file with mode: 0644]
typo3/sysext/core/Classes/Site/Entity/PseudoSite.php [new file with mode: 0644]
typo3/sysext/core/Classes/Site/Entity/Site.php
typo3/sysext/core/Classes/Site/PseudoSiteFinder.php [new file with mode: 0644]
typo3/sysext/core/Classes/Site/SiteFinder.php
typo3/sysext/core/Documentation/Changelog/master/Feature-85900-PseudoSiteHandling.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Site/Entity/PseudoSiteTest.php [new file with mode: 0644]
typo3/sysext/frontend/Classes/Compatibility/LegacyDomainResolver.php
typo3/sysext/frontend/Classes/Middleware/SiteResolver.php
typo3/sysext/frontend/Tests/Unit/Middleware/SiteResolverTest.php