Backend\Classes\WidgetManager\HasReportWidgets
Protected Properties
protected array $reportWidgets
protected array $reportWidgetCallbacks
reportWidgetCallbacks cache
protected array $reportWidgetHints
reportWidgetHints keyed by their code. Stored in the report of ['reportwidgetcode' => 'FormWidgetClass'].
Public Methods
public getReportWidgets()
public getReportWidgets(): array
getReportWidgets returns the raw array of registered report widgets.
public listReportWidgets()
public listReportWidgets(): array
listReportWidgets returns a list of registered report widgets.
public registerReportWidget()
public registerReportWidget($className, $widgetInfo): void
public registerReportWidgets()
public registerReportWidgets($definitions): void
registerReportWidgets manually registers report widget for consideration. Usage:
WidgetManager::registerReportWidgets(function ($manager) {
$manager->registerReportWidget(\RainLab\GoogleAnalytics\ReportWidgets\TrafficOverview::class, [
'name' => 'Google Analytics traffic overview',
'context' => 'dashboard'
]);
});
public removeReportWidget()
public removeReportWidget(string $className): void
removeReportWidget removes a registered ReportWidget.
public resolveReportWidget()
public resolveReportWidget(string $name): string
resolveReportWidget returns a class name from a report widget code Normalizes a class name or converts an code to its class name. Returns the class name resolved, or the original name.