Backend\Controllers\Index\DashboardHandler

Overview

DashboardHandler handles requests to dashboard widgets.


Protected Properties

protected array $properties

properties contains the object property values.


Public Methods

public defineProperties()

public defineProperties(): void

defineProperties used by this class. This method should be used as an override in the extended class.

public getProperties()

public getProperties(): array 

getProperties returns all properties.

public getPropertyOptions()

public getPropertyOptions(string $property): array 

getPropertyOptions returns options for multi-option properties (drop-downs, etc.)

public getWidgetData()

public getWidgetData(
    $controller,
    $widgetConfig,
    $dashboardDateStart,
    $dashboardDateEnd,
    $aggregationInterval,
    $resetCache,
    $dimensionCode,
    $metricCodes,
    $extraData,
    $compare
): mixed 

public onGetWidgetCustomData()

public onGetWidgetCustomData(
    $controller,
    $widgetConfig,
    $dashboardDateStart,
    $dashboardDateEnd,
    $aggregationInterval,
    $resetCache,
    $extraData,
    $compare
): mixed 

public property()

public property(string $name, ?string $default = null): ?string 

property returns a defined property value or default if one is not set.

public runCustomWidgetHandler()

public runCustomWidgetHandler(
    $controller,
    $handlerName,
    $widgetConfig,
    $extraData
): void

public runDataSourceHandler()

public runDataSourceHandler($controller, $handlerName, $widgetConfig): void

public setProperties()

public setProperties(array $properties): void 

setProperties for multiple values

public setProperty()

public setProperty(string $name, mixed $value): void 

setProperty for a single value

public validateProperties()

public validateProperties(array $properties): array 

validateProperties against the defined properties of the class. This method also sets default properties.