[!!!][FEATURE] Introduce Backend Routing 76/37476/10
authorBenjamin Mack <benni@typo3.org>
Tue, 3 Mar 2015 14:02:28 +0000 (15:02 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Mon, 23 Mar 2015 18:33:58 +0000 (19:33 +0100)
commita08ce7238e583d1962edfe998e04c7d9c3d7c2ae
treebf4697f001d4b06c3bb450e2a5974f486d776738
parent15b5115c808a780d5264df84f5111b8d89d5854a
[!!!][FEATURE] Introduce Backend Routing

A new Routing API is introduced in order to streamline
the entrypoints to the TYPO3 Backend.

All previous patches by Wouter for the dispatched modules
are the foundation for this change.

Instead of using the term "module" for anything linkable
in the backend, the term "routes" fits more. A "module"
or an ajax call is a derivative of a route, which will
build on this foundation.

Routes can be registered via
Configuration/Backend/Routes.php in any extension
and are loaded solely on Backend requests.

The Routing API is inspired by the Symfony Routing
framework and mostly compatible for now
but the TYPO3 implementation only takes around
20% of the needed logic.

There are three new classes:
- Route (a single route with a path and some options)
- Router (API to match paths and generate URLs)
- UrlGenerator (Generates the URL)

This patch changes the entrypoint for
login/logout to typo3/index.php/myroute/?token=...
making index.php the only entrypoint to the
TYPO3 Backend in the future and using the PATH_INFO
functionality of the browser to store the route.

The main RequestHandler of all Backend modules
detects where a PATH_INFO is given and
then resolves to a controller/action logic and checks
for a valid token.

Once this patch is in, all non-module entrypoints
are moved to the new format.

See http://wiki.typo3.org/Blueprints/BackendRouting
for implementation details.

Resolves: #65493
Releases: master
Change-Id: I91b5812c833c558794f70fd4504f2da452b1c3ce
Reviewed-on: http://review.typo3.org/37476
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
19 files changed:
typo3/backend.php
typo3/index.php
typo3/sysext/backend/Classes/AjaxRequestHandler.php
typo3/sysext/backend/Classes/BackendModuleRequestHandler.php
typo3/sysext/backend/Classes/Controller/BackendController.php
typo3/sysext/backend/Classes/Controller/LoginController.php
typo3/sysext/backend/Classes/Controller/LogoutController.php
typo3/sysext/backend/Classes/RequestHandler.php
typo3/sysext/backend/Classes/Routing/Exception/ResourceNotFoundException.php [new file with mode: 0644]
typo3/sysext/backend/Classes/Routing/Exception/RouteNotFoundException.php [new file with mode: 0644]
typo3/sysext/backend/Classes/Routing/Generator/UrlGenerator.php [new file with mode: 0644]
typo3/sysext/backend/Classes/Routing/Route.php [new file with mode: 0644]
typo3/sysext/backend/Classes/Routing/Router.php [new file with mode: 0644]
typo3/sysext/backend/Classes/Template/DocumentTemplate.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/backend/Configuration/Backend/Routes.php [new file with mode: 0644]
typo3/sysext/backend/ext_tables.php
typo3/sysext/core/Classes/Core/Bootstrap.php
typo3/sysext/core/Documentation/Changelog/master/Feature-65493-BackendRouting.rst [new file with mode: 0644]