‪TYPO3CMS  9.5
TYPO3\CMS\Backend\Http\AjaxRequestHandler Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Http\AjaxRequestHandler:
TYPO3\CMS\Core\Http\RequestHandlerInterface

Public Member Functions

ResponseInterface handleRequest (ServerRequestInterface $request)
 
ResponseInterface handle (ServerRequestInterface $request)
 
bool canHandleRequest (ServerRequestInterface $request)
 
int getPriority ()
 

Detailed Description

AJAX dispatcher

Main entry point for AJAX calls in the TYPO3 Backend. Based on ?route=/ajax/* of the outside application.

AJAX Requests are typically registered within EXT:myext/Configuration/Backend/AjaxRoutes.php

Deprecated:
‪since TYPO3 v9.2, will be removed in TYPO3 v10.0

Definition at line 36 of file AjaxRequestHandler.php.

Member Function Documentation

◆ canHandleRequest()

bool TYPO3\CMS\Backend\Http\AjaxRequestHandler::canHandleRequest ( ServerRequestInterface  $request)

This request handler can handle any backend request having an /ajax/ request

Parameters
ServerRequestInterface$request
Returns
‪bool If the request is an AJAX backend request, TRUE otherwise FALSE

Implements TYPO3\CMS\Core\Http\RequestHandlerInterface.

Definition at line 81 of file AjaxRequestHandler.php.

◆ getPriority()

int TYPO3\CMS\Backend\Http\AjaxRequestHandler::getPriority ( )

Returns the priority - how eager the handler is to actually handle the request.

Returns
‪int The priority of the request handler.

Implements TYPO3\CMS\Core\Http\RequestHandlerInterface.

Definition at line 93 of file AjaxRequestHandler.php.

◆ handle()

ResponseInterface TYPO3\CMS\Backend\Http\AjaxRequestHandler::handle ( ServerRequestInterface  $request)

Handles any AJAX request in the TYPO3 Backend, after finishing running middlewares

Creates a response object with JSON headers automatically, and then dispatches to the correct route

Parameters
ServerRequestInterface$request
Returns
‪ResponseInterface
Exceptions
ResourceNotFoundException‪if no valid route was found
InvalidRequestTokenException‪if the request could not be verified

Definition at line 60 of file AjaxRequestHandler.php.

Referenced by TYPO3\CMS\Backend\Http\AjaxRequestHandler\handleRequest().

◆ handleRequest()

ResponseInterface TYPO3\CMS\Backend\Http\AjaxRequestHandler::handleRequest ( ServerRequestInterface  $request)

Handles any AJAX request in the TYPO3 Backend

Parameters
ServerRequestInterface$request
Returns
‪ResponseInterface

Implements TYPO3\CMS\Core\Http\RequestHandlerInterface.

Definition at line 44 of file AjaxRequestHandler.php.

References TYPO3\CMS\Backend\Http\AjaxRequestHandler\handle().