Feature: #69916 - PSR-7-based Routing for Backend AJAX Requests¶
See Issue #69916
Support for PSR-7-based Routing for Backend AJAX requests has been added.
To add a route for an AJAX request, create the
Configuration/Backend/AjaxRoutes.php of your extension:
return [ // Does something 'unique_route_name' => [ 'path' => '/toolcollection/some-action', 'target' => \ACME\Controller\SomeController::class . '::myAction', ] ];
The unique_route_name (route identifier) parameter acts as the previously known key to
BackendUtility::getAjaxUrl() passed as parameter to the action refers to the route path,
not to the route identifier itself. AJAX handlers configured in
AjaxRoutes.php are not compatible
with definitions in
ext_localconf.php registered by
due to different method signatures in the target actions, using PSR-7.
The route identifier is used in
$ajaxIdentifier and as key in the global