BackendModuleValidator implements MiddlewareInterface
Validates module access and extends the PSR-7 Request with the resolved module object for the use in further components.
Table of Contents
Interfaces
- MiddlewareInterface
Properties
- $flashMessageService : FlashMessageService
- $moduleProvider : ModuleProvider
- $uriBuilder : UriBuilder
Methods
- __construct() : mixed
- process() : ResponseInterface
- In case the current route targets a TYPO3 backend module and the user has necessary access permissions, add the module to the request.
- enqueueRedirectMessage() : void
- getLanguageService() : LanguageService
- validateModuleAccess() : void
- Checks whether the current user is allowed to access the requested module. Does also evaluate page access permissions, in case an "id" is given in the request.
Properties
$flashMessageService read-only
protected
FlashMessageService
$flashMessageService
$moduleProvider read-only
protected
ModuleProvider
$moduleProvider
$uriBuilder read-only
protected
UriBuilder
$uriBuilder
Methods
__construct()
public
__construct(UriBuilder $uriBuilder, ModuleProvider $moduleProvider, FlashMessageService $flashMessageService) : mixed
Parameters
- $uriBuilder : UriBuilder
- $moduleProvider : ModuleProvider
- $flashMessageService : FlashMessageService
process()
In case the current route targets a TYPO3 backend module and the user has necessary access permissions, add the module to the request.
public
process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
Parameters
- $request : ServerRequestInterface
- $handler : RequestHandlerInterface
Return values
ResponseInterfaceenqueueRedirectMessage()
protected
enqueueRedirectMessage(ModuleInterface $requestedModule, ModuleInterface $redirectedModule) : void
Parameters
- $requestedModule : ModuleInterface
- $redirectedModule : ModuleInterface
getLanguageService()
protected
getLanguageService() : LanguageService
Return values
LanguageServicevalidateModuleAccess()
Checks whether the current user is allowed to access the requested module. Does also evaluate page access permissions, in case an "id" is given in the request.
protected
validateModuleAccess(ServerRequestInterface $request, ModuleInterface $module) : void
Parameters
- $request : ServerRequestInterface
- $module : ModuleInterface