DashboardInitializationService
Table of Contents
Constants
- MODULE_DATA_CURRENT_DASHBOARD_IDENTIFIER = 'dashboard/current_dashboard/'
Properties
- $javaScriptModuleInstructions : array<int, JavaScriptModuleInstruction>
Methods
- __construct() : mixed
- getCssFiles() : array<string|int, mixed>
- getDashboardsForUser() : array<string|int, Dashboard>
- getJavaScriptModuleInstructions() : array<int, JavaScriptModuleInstruction>
- getJsFiles() : array<string|int, mixed>
- initializeDashboards() : void
- createDefaultDashboards() : array<string|int, mixed>
- defineCssFiles() : void
- Define the correct path of the CSS files of a widget and add them to the list of CSS files that needs to be included
- defineCurrentDashboard() : Dashboard
- defineJavaScriptInstructions() : void
- defineJsFiles() : void
- Define the correct path of the JS files of a widget and add them to the list of JS files that needs to be included
- defineResourcesOfWidgets() : void
- loadCurrentDashboard() : string
- saveCurrentDashboard() : void
Constants
MODULE_DATA_CURRENT_DASHBOARD_IDENTIFIER
    protected
        mixed
    MODULE_DATA_CURRENT_DASHBOARD_IDENTIFIER
    = 'dashboard/current_dashboard/'
    
    
    
    
Properties
$javaScriptModuleInstructions
        protected
            array<int, JavaScriptModuleInstruction>
    $javaScriptModuleInstructions
     = []
    
    
    
    
    
Methods
__construct()
    public
                    __construct(DashboardRepository $dashboardRepository, DashboardPresetRegistry $dashboardPresetRegistry, WidgetRegistry $widgetRegistry) : mixed
    Parameters
- $dashboardRepository : DashboardRepository
- $dashboardPresetRegistry : DashboardPresetRegistry
- $widgetRegistry : WidgetRegistry
getCssFiles()
    public
                    getCssFiles() : array<string|int, mixed>
    Return values
array<string|int, mixed>getDashboardsForUser()
    public
                    getDashboardsForUser(BackendUserAuthentication $user) : array<string|int, Dashboard>
    Parameters
- $user : BackendUserAuthentication
Return values
array<string|int, Dashboard>getJavaScriptModuleInstructions()
    public
                    getJavaScriptModuleInstructions() : array<int, JavaScriptModuleInstruction>
    Return values
array<int, JavaScriptModuleInstruction>getJsFiles()
    public
                    getJsFiles() : array<string|int, mixed>
    Return values
array<string|int, mixed>initializeDashboards()
    public
                    initializeDashboards(ServerRequestInterface $request, BackendUserAuthentication $user) : void
    Parameters
- $request : ServerRequestInterface
- $user : BackendUserAuthentication
createDefaultDashboards()
    protected
                    createDefaultDashboards(BackendUserAuthentication $user) : array<string|int, mixed>
    Parameters
- $user : BackendUserAuthentication
Return values
array<string|int, mixed>defineCssFiles()
Define the correct path of the CSS files of a widget and add them to the list of CSS files that needs to be included
    protected
                    defineCssFiles(AdditionalCssInterface $widgetInstance) : void
    Parameters
- $widgetInstance : AdditionalCssInterface
defineCurrentDashboard()
    protected
                    defineCurrentDashboard(BackendUserAuthentication $user) : Dashboard
    Parameters
- $user : BackendUserAuthentication
Return values
DashboarddefineJavaScriptInstructions()
    protected
                    defineJavaScriptInstructions(JavaScriptInterface $widgetInstance) : void
    Parameters
- $widgetInstance : JavaScriptInterface
defineJsFiles()
Define the correct path of the JS files of a widget and add them to the list of JS files that needs to be included
    protected
                    defineJsFiles(AdditionalJavaScriptInterface $widgetInstance) : void
    Parameters
- $widgetInstance : AdditionalJavaScriptInterface
defineResourcesOfWidgets()
    protected
                    defineResourcesOfWidgets() : void
    loadCurrentDashboard()
    protected
                    loadCurrentDashboard(BackendUserAuthentication $user) : string
    Parameters
- $user : BackendUserAuthentication
Return values
stringsaveCurrentDashboard()
    protected
                    saveCurrentDashboard(BackendUserAuthentication $user, string $identifier) : void
    Parameters
- $user : BackendUserAuthentication
- $identifier : string