TYPO3
7.6
|
Public Member Functions | |
__construct (Bootstrap $bootstrap) | |
handleRequest (ServerRequestInterface $request) | |
canHandleRequest (ServerRequestInterface $request) | |
getPriority () | |
Public Member Functions inherited from RequestHandlerInterface | |
handleRequest (\Psr\Http\Message\ServerRequestInterface $request) | |
canHandleRequest (\Psr\Http\Message\ServerRequestInterface $request) | |
Protected Member Functions | |
isLoggedInBackendUserRequired ($ajaxId) | |
boot ($proceedIfNoUserIsLoggedIn) | |
getFormProtection () | |
isValidRequest (ServerRequestInterface $request) | |
Protected Attributes | |
$bootstrap | |
$publicAjaxIds | |
AJAX dispatcher
Main entry point for AJAX calls in the TYPO3 Backend. Based on ?ajaxId of the outside application. Before doing the basic BE-related set up of this request (see the additional calls on $this->bootstrap inside handleRequest()), some AJAX-calls can be made without a valid user, which is determined here. See $GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX'] and the Core APIs on how to register an AJAX call in the TYPO3 Backend.
Due to legacy reasons, the actual logic is in EXT:core/Http/AjaxRequestHandler which will eventually be moved into this class. In the future, the logic for "TYPO3_PROCEED_IF_NO_USER" will be moved in here as well.
Definition at line 40 of file backend/Classes/Http/AjaxRequestHandler.php.
__construct | ( | Bootstrap | $bootstrap | ) |
Constructor handing over the bootstrap and the original request
Bootstrap | $bootstrap |
Definition at line 65 of file backend/Classes/Http/AjaxRequestHandler.php.
References AjaxRequestHandler\$bootstrap.
|
protected |
Start the Backend bootstrap part
bool | $proceedIfNoUserIsLoggedIn | a flag if a backend user is required |
Definition at line 135 of file backend/Classes/Http/AjaxRequestHandler.php.
Referenced by AjaxRequestHandler\handleRequest().
canHandleRequest | ( | ServerRequestInterface | $request | ) |
This request handler can handle any backend request having an ajaxID as parameter (see Application.php in EXT:backend)
ServerRequestInterface | $request |
Definition at line 103 of file backend/Classes/Http/AjaxRequestHandler.php.
References ServerRequestInterface\getAttribute().
|
protected |
Wrapper method for static form protection utility
Definition at line 220 of file backend/Classes/Http/AjaxRequestHandler.php.
References FormProtectionFactory\get().
Referenced by AjaxRequestHandler\isValidRequest().
getPriority | ( | ) |
Returns the priority - how eager the handler is to actually handle the request.
Implements RequestHandlerInterface.
Definition at line 113 of file backend/Classes/Http/AjaxRequestHandler.php.
handleRequest | ( | ServerRequestInterface | $request | ) |
Handles any AJAX request in the TYPO3 Backend
ServerRequestInterface | $request |
Definition at line 76 of file backend/Classes/Http/AjaxRequestHandler.php.
References $GLOBALS, AjaxRequestHandler\boot(), ServerRequestInterface\getParsedBody(), ServerRequestInterface\getQueryParams(), AjaxRequestHandler\isLoggedInBackendUserRequired(), and ServerRequestInterface\withAttribute().
|
protected |
Check if the user is required for the request If we're trying to do an ajax login, don't require a user
string | $ajaxId | the Ajax ID to check against |
Definition at line 125 of file backend/Classes/Http/AjaxRequestHandler.php.
Referenced by AjaxRequestHandler\handleRequest().
|
protected |
Checks if the request token is valid. This is checked to see if the route is really created by the same instance. Should be called for all routes in the backend except for the ones that don't require a login.
ServerRequestInterface | $request |
Definition at line 234 of file backend/Classes/Http/AjaxRequestHandler.php.
References ServerRequestInterface\getAttribute(), AjaxRequestHandler\getFormProtection(), ServerRequestInterface\getParsedBody(), and ServerRequestInterface\getQueryParams().
|
protected |
Definition at line 46 of file backend/Classes/Http/AjaxRequestHandler.php.
Referenced by AjaxRequestHandler\__construct().
|
protected |
Definition at line 52 of file backend/Classes/Http/AjaxRequestHandler.php.