DashboardController
Attributes
- #[AsController]
Table of Contents
Properties
- $currentDashboard : Dashboard
- $dashboardInitializationService : DashboardInitializationService
- $dashboardPresetRepository : DashboardPresetRegistry
- $dashboardRepository : DashboardRepository
- $moduleTemplateFactory : ModuleTemplateFactory
- $pageRenderer : PageRenderer
- $uriBuilder : UriBuilder
- $widgetGroupInitializationService : WidgetGroupInitializationService
Methods
- __construct() : mixed
- handleRequest() : ResponseInterface
- Main entry method: Dispatch to other actions - those method names that end with "Action".
- addDashboardAction() : ResponseInterface
- addFrontendResources() : void
- Adds CSS and JS files that are necessary for widgets to the page renderer
- addWidgetAction() : ResponseInterface
- configureDashboardAction() : ResponseInterface
- deleteDashboardAction() : ResponseInterface
- getBackendUser() : BackendUserAuthentication
- getLanguageService() : LanguageService
- mainAction() : ResponseInterface
- This action is responsible for the main view of the dashboard and is just adding all collected data to the view.
- preparePageRenderer() : void
- Add the CSS and JS of the dashboard module to the page renderer
- removeWidgetAction() : ResponseInterface
- saveCurrentDashboard() : void
- setActiveDashboardAction() : ResponseInterface
Properties
$currentDashboard
protected
Dashboard
$currentDashboard
$dashboardInitializationService read-only
protected
DashboardInitializationService
$dashboardInitializationService
$dashboardPresetRepository read-only
protected
DashboardPresetRegistry
$dashboardPresetRepository
$dashboardRepository read-only
protected
DashboardRepository
$dashboardRepository
$moduleTemplateFactory read-only
protected
ModuleTemplateFactory
$moduleTemplateFactory
$pageRenderer read-only
protected
PageRenderer
$pageRenderer
$uriBuilder read-only
protected
UriBuilder
$uriBuilder
$widgetGroupInitializationService read-only
protected
WidgetGroupInitializationService
$widgetGroupInitializationService
Methods
__construct()
public
__construct(PageRenderer $pageRenderer, UriBuilder $uriBuilder, DashboardPresetRegistry $dashboardPresetRepository, DashboardRepository $dashboardRepository, DashboardInitializationService $dashboardInitializationService, WidgetGroupInitializationService $widgetGroupInitializationService, ModuleTemplateFactory $moduleTemplateFactory) : mixed
Parameters
- $pageRenderer : PageRenderer
- $uriBuilder : UriBuilder
- $dashboardPresetRepository : DashboardPresetRegistry
- $dashboardRepository : DashboardRepository
- $dashboardInitializationService : DashboardInitializationService
- $widgetGroupInitializationService : WidgetGroupInitializationService
- $moduleTemplateFactory : ModuleTemplateFactory
handleRequest()
Main entry method: Dispatch to other actions - those method names that end with "Action".
public
handleRequest(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfaceaddDashboardAction()
protected
addDashboardAction(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfaceaddFrontendResources()
Adds CSS and JS files that are necessary for widgets to the page renderer
protected
addFrontendResources() : void
addWidgetAction()
protected
addWidgetAction(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfaceconfigureDashboardAction()
protected
configureDashboardAction(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfacedeleteDashboardAction()
protected
deleteDashboardAction() : ResponseInterface
Return values
ResponseInterfacegetBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetLanguageService()
protected
getLanguageService() : LanguageService
Return values
LanguageServicemainAction()
This action is responsible for the main view of the dashboard and is just adding all collected data to the view.
protected
mainAction(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfacepreparePageRenderer()
Add the CSS and JS of the dashboard module to the page renderer
protected
preparePageRenderer() : void
removeWidgetAction()
protected
removeWidgetAction(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfacesaveCurrentDashboard()
protected
saveCurrentDashboard(string $identifier) : void
Parameters
- $identifier : string
setActiveDashboardAction()
protected
setActiveDashboardAction(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface