BackendController uses PageRendererBackendSetupTrait
Class for rendering the TYPO3 backend.
This is the backend outer main frame with topbar and module menu.
Attributes
- #[AsController]
Table of Contents
Properties
- $eventDispatcher : EventDispatcherInterface
- $extensionConfiguration : ExtensionConfiguration
- $flashMessageService : FlashMessageService
- $moduleProvider : ModuleProvider
- $modules : array<string|int, ModuleInterface>
- $pageRenderer : PageRenderer
- $toolbarItemsRegistry : ToolbarItemsRegistry
- $typo3Version : Typo3Version
- $uriBuilder : UriBuilder
- $viewFactory : BackendViewFactory
Methods
- __construct() : mixed
- getModuleMenu() : ResponseInterface
- Returns the main module menu as json encoded HTML string. Used when "update signals" request a menu reload, e.g. when an extension is loaded that brings new main modules.
- getTopbar() : ResponseInterface
- Returns the toolbar as json encoded HTML string. Used when "update signals" request a toolbar reload, e.g. when an extension is loaded.
- mainAction() : ResponseInterface
- Main function generating the BE scaffolding.
- assignTopbarDetailsToView() : void
- Renders the topbar, containing the backend logo, sitename etc.
- enqueueRedirectMessage() : void
- getBackendFavicon() : string
- Retrieves configured favicon for backend with fallback.
- getBackendUser() : BackendUserAuthentication
- getCollapseStateOfMenu() : bool
- getLanguageService() : LanguageService
- getModulesInformation() : array<string|int, mixed>
- Returns information for each registered and allowed module. Used by various JS components.
- getNormalizedParams() : NormalizedParams
- getRegisteredStylesheetFolders() : array<string|int, mixed>
- Return an array of all stylesheet directories registered via $GLOBAlS['TBE_STYLES']['skins'].
- getStartupModule() : array<string|int, mixed>
- Sets the startup module from either "redirect" GET parameters or user configuration.
- getToolbarItems() : array<string|int, ToolbarItemInterface>
- getUriForFileName() : string
- Returns the uri of a relative reference, resolves the "EXT:" prefix (way of referring to files inside extensions) and checks that the file is inside the project root of the TYPO3 installation
- isSpecialNoModuleRoute() : bool
- Check if given route identifier is a special "no module" route
- loadStylesheets() : void
- Load all registered stylesheets from $GLOBALS['TBE_STYLES'] "API"
- setUpBasicPageRendererForBackend() : void
- Sets mandatory parameters for the PageRenderer.
Properties
$eventDispatcher read-only
protected
EventDispatcherInterface
$eventDispatcher
$extensionConfiguration read-only
protected
ExtensionConfiguration
$extensionConfiguration
$flashMessageService read-only
protected
FlashMessageService
$flashMessageService
$moduleProvider read-only
protected
ModuleProvider
$moduleProvider
$modules
protected
array<string|int, ModuleInterface>
$modules
$pageRenderer read-only
protected
PageRenderer
$pageRenderer
$toolbarItemsRegistry read-only
protected
ToolbarItemsRegistry
$toolbarItemsRegistry
$typo3Version read-only
protected
Typo3Version
$typo3Version
$uriBuilder read-only
protected
UriBuilder
$uriBuilder
$viewFactory read-only
protected
BackendViewFactory
$viewFactory
Methods
__construct()
public
__construct(Typo3Version $typo3Version, UriBuilder $uriBuilder, PageRenderer $pageRenderer, ModuleProvider $moduleProvider, ToolbarItemsRegistry $toolbarItemsRegistry, ExtensionConfiguration $extensionConfiguration, BackendViewFactory $viewFactory, EventDispatcherInterface $eventDispatcher, FlashMessageService $flashMessageService) : mixed
Parameters
- $typo3Version : Typo3Version
- $uriBuilder : UriBuilder
- $pageRenderer : PageRenderer
- $moduleProvider : ModuleProvider
- $toolbarItemsRegistry : ToolbarItemsRegistry
- $extensionConfiguration : ExtensionConfiguration
- $viewFactory : BackendViewFactory
- $eventDispatcher : EventDispatcherInterface
- $flashMessageService : FlashMessageService
getModuleMenu()
Returns the main module menu as json encoded HTML string. Used when "update signals" request a menu reload, e.g. when an extension is loaded that brings new main modules.
public
getModuleMenu(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfacegetTopbar()
Returns the toolbar as json encoded HTML string. Used when "update signals" request a toolbar reload, e.g. when an extension is loaded.
public
getTopbar(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfacemainAction()
Main function generating the BE scaffolding.
public
mainAction(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfaceassignTopbarDetailsToView()
Renders the topbar, containing the backend logo, sitename etc.
protected
assignTopbarDetailsToView(ServerRequestInterface $request, ViewInterface $view) : void
Parameters
- $request : ServerRequestInterface
- $view : ViewInterface
enqueueRedirectMessage()
protected
enqueueRedirectMessage(ModuleInterface $requestedModule, ModuleInterface $redirectedModule) : void
Parameters
- $requestedModule : ModuleInterface
- $redirectedModule : ModuleInterface
getBackendFavicon()
Retrieves configured favicon for backend with fallback.
protected
getBackendFavicon(ExtensionConfiguration $extensionConfiguration, ServerRequestInterface $request) : string
Parameters
- $extensionConfiguration : ExtensionConfiguration
- $request : ServerRequestInterface
Return values
stringgetBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetCollapseStateOfMenu()
protected
getCollapseStateOfMenu() : bool
Return values
boolgetLanguageService()
protected
getLanguageService() : LanguageService
Return values
LanguageServicegetModulesInformation()
Returns information for each registered and allowed module. Used by various JS components.
protected
getModulesInformation() : array<string|int, mixed>
Return values
array<string|int, mixed>getNormalizedParams()
protected
getNormalizedParams(ServerRequestInterface $request) : NormalizedParams
Parameters
- $request : ServerRequestInterface
Return values
NormalizedParamsgetRegisteredStylesheetFolders()
Return an array of all stylesheet directories registered via $GLOBAlS['TBE_STYLES']['skins'].
protected
getRegisteredStylesheetFolders() : array<string|int, mixed>
will be removed in TYPO3 v13.0. Use $GLOBALS['TYPO3_CONF_VARS']['BE']['stylesheets'] instead.
Return values
array<string|int, mixed>getStartupModule()
Sets the startup module from either "redirect" GET parameters or user configuration.
protected
getStartupModule(ServerRequestInterface $request) : array<string|int, mixed>
Parameters
- $request : ServerRequestInterface
Return values
array<string|int, mixed>getToolbarItems()
protected
getToolbarItems(ServerRequestInterface $request) : array<string|int, ToolbarItemInterface>
Parameters
- $request : ServerRequestInterface
Return values
array<string|int, ToolbarItemInterface>getUriForFileName()
Returns the uri of a relative reference, resolves the "EXT:" prefix (way of referring to files inside extensions) and checks that the file is inside the project root of the TYPO3 installation
protected
getUriForFileName(ServerRequestInterface $request, string $filename) : string
Parameters
- $request : ServerRequestInterface
- $filename : string
-
The input filename/filepath to evaluate
Return values
string —Returns the filename of $filename if valid, otherwise blank string.
isSpecialNoModuleRoute()
Check if given route identifier is a special "no module" route
protected
isSpecialNoModuleRoute(string $routeIdentifier) : bool
Parameters
- $routeIdentifier : string
Return values
boolloadStylesheets()
Load all registered stylesheets from $GLOBALS['TBE_STYLES'] "API"
protected
loadStylesheets(PageRenderer $pageRenderer) : void
Parameters
- $pageRenderer : PageRenderer
setUpBasicPageRendererForBackend()
Sets mandatory parameters for the PageRenderer.
protected
setUpBasicPageRendererForBackend(PageRenderer $pageRenderer, ExtensionConfiguration $extensionConfiguration, ServerRequestInterface $request, LanguageService $languageService) : void
Parameters
- $pageRenderer : PageRenderer
- $extensionConfiguration : ExtensionConfiguration
- $request : ServerRequestInterface
- $languageService : LanguageService