[FEATURE] Introduce PageTypeEnhancer 78/58478/14
authorBenni Mack <benni@typo3.org>
Sat, 29 Sep 2018 22:27:04 +0000 (00:27 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Sun, 30 Sep 2018 22:45:54 +0000 (00:45 +0200)
commit1e10c48e62db258ff4a83f5c24b46c5e62978974
treef5a63620f8bf083a67d03e7ab88f66ae4f6c9a32
parent6d0d2a744dac32357254e2481fb7387523295f4d
[FEATURE] Introduce PageTypeEnhancer

A new PageTypeEnhancer is added to map the internal TYPO3
GET parameter `type` to a speaking URL suffix.

The PageTypeEnhancer only does suffixes, if other

You can configure it like this:

routeEnhancers:
  PageType:
    type: PageType
    default: ''
    map:
      '.html': 1
      'menu.json': 13

Resolves: #86160
Releases: master
Change-Id: Ie4b387963012946272568a69c9581e8d345dbe4c
Reviewed-on: https://review.typo3.org/58478
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
15 files changed:
typo3/sysext/core/Classes/Routing/Enhancer/AbstractEnhancer.php
typo3/sysext/core/Classes/Routing/Enhancer/DecoratingEnhancerInterface.php [new file with mode: 0644]
typo3/sysext/core/Classes/Routing/Enhancer/EnhancerInterface.php
typo3/sysext/core/Classes/Routing/Enhancer/PageTypeDecorator.php [new file with mode: 0644]
typo3/sysext/core/Classes/Routing/Enhancer/PluginEnhancer.php
typo3/sysext/core/Classes/Routing/Enhancer/RoutingEnhancerInterface.php [new file with mode: 0644]
typo3/sysext/core/Classes/Routing/Enhancer/SimpleEnhancer.php
typo3/sysext/core/Classes/Routing/PageArguments.php
typo3/sysext/core/Classes/Routing/PageRouter.php
typo3/sysext/core/Classes/Routing/Route.php
typo3/sysext/core/Configuration/DefaultConfiguration.php
typo3/sysext/core/Documentation/Changelog/master/Feature-86160-PageTypeEnhancerForMappingTypeParameter.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Routing/PageRouterTest.php
typo3/sysext/frontend/Classes/Middleware/PageResolver.php
typo3/sysext/frontend/Tests/Unit/Middleware/PageResolverTest.php