Backend\Classes\WidgetManager\HasFilterWidgets


Protected Properties

protected array $filterWidgets

protected array $filterWidgetCallbacks

filterWidgetCallbacks cache

protected array $filterWidgetHints

filterWidgetHints keyed by their code. Stored in the form of ['filterwidgetcode' => 'FilterWidgetClass'].


Public Methods

public getFilterWidgets()

public getFilterWidgets(): array 

getFilterWidgets returns the raw array of registered filter widgets.

public listFilterWidgets()

public listFilterWidgets(): array 

listFilterWidgets returns a list of registered filter widgets.

public registerFilterWidget()

public registerFilterWidget($className, $widgetInfo): void

public registerFilterWidgets()

public registerFilterWidgets($definitions): void

registerFilterWidgets manually registers filter widget for consideration. Usage:

WidgetManager::registerFilterWidgets(function ($manager) {
    $manager->registerFilterWidget(\Backend\FilterWidgets\DateRange::class, 'daterange');
});

public resolveFilterWidget()

public resolveFilterWidget(string $name): string 

resolveFilterWidget returns a class name from a filter widget code Normalizes a class name or converts an code to its class name.