MainController implements SingletonInterface
Main controller for the admin panel
Table of Contents
Interfaces
- SingletonInterface
- "empty" interface for singletons (marker interface pattern)
Properties
- $adminPanelModuleConfiguration : array<string|int, mixed>
- $configurationService : ConfigurationService
- $moduleLoader : ModuleLoader
- $modules : array<string|int, ModuleInterface>
- $uriBuilder : UriBuilder
Methods
- __construct() : mixed
- initialize() : ServerRequestInterface
- Initializes settings for the admin panel.
- render() : string
- Renders the admin panel - Called in PSR-15 Middleware
- storeData() : void
- Stores data for admin panel in cache - Called in PSR-15 Middleware
- generateBackendUrl() : string
- Generate a url to a backend route
- getBackendUser() : BackendUserAuthentication
- initializeModules() : ServerRequestInterface
- storeDataPerModule() : ModuleDataStorageCollection
Properties
$adminPanelModuleConfiguration
protected
array<string|int, mixed>
$adminPanelModuleConfiguration
$configurationService
protected
ConfigurationService
$configurationService
$moduleLoader
protected
ModuleLoader
$moduleLoader
$modules
protected
array<string|int, ModuleInterface>
$modules
= []
$uriBuilder
protected
UriBuilder
$uriBuilder
Methods
__construct()
public
__construct([ModuleLoader|null $moduleLoader = null ][, UriBuilder|null $uriBuilder = null ][, ConfigurationService|null $configurationService = null ]) : mixed
Parameters
- $moduleLoader : ModuleLoader|null = null
- $uriBuilder : UriBuilder|null = null
- $configurationService : ConfigurationService|null = null
initialize()
Initializes settings for the admin panel.
public
initialize(ServerRequestInterface $request) : ServerRequestInterface
Parameters
- $request : ServerRequestInterface
Return values
ServerRequestInterfacerender()
Renders the admin panel - Called in PSR-15 Middleware
public
render(ServerRequestInterface $request) : string
Parameters
- $request : ServerRequestInterface
Tags
Return values
stringstoreData()
Stores data for admin panel in cache - Called in PSR-15 Middleware
public
storeData(ServerRequestInterface $request) : void
Parameters
- $request : ServerRequestInterface
Tags
generateBackendUrl()
Generate a url to a backend route
protected
generateBackendUrl(string $route) : string
Parameters
- $route : string
Return values
stringgetBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationinitializeModules()
protected
initializeModules(ServerRequestInterface $request, array<string|int, ModuleInterface> $modules) : ServerRequestInterface
Parameters
- $request : ServerRequestInterface
- $modules : array<string|int, ModuleInterface>
Return values
ServerRequestInterfacestoreDataPerModule()
protected
storeDataPerModule(ServerRequestInterface $request, array<string|int, ModuleInterface> $modules, ModuleDataStorageCollection $data) : ModuleDataStorageCollection
Parameters
- $request : ServerRequestInterface
- $modules : array<string|int, ModuleInterface>
- $data : ModuleDataStorageCollection