ListWidget implements WidgetRendererInterface
Concrete List Widget implementation
The widget will show a simple list with items provided by a data provider. You can add a button to the widget by defining a button provider.
There are no options available for this widget
Tags
Table of Contents
Interfaces
- WidgetRendererInterface
- The WidgetRendererInterface is the (new) base interface for all kind of widgets.
Methods
- __construct() : mixed
- getSettingsDefinitions() : array<string|int, SettingDefinition>
- renderWidget() : WidgetResult
- This method returns the content of a widget. The returned markup will be delivered by an AJAX call and will not be escaped.
- getItems() : array<string|int, mixed>
Methods
__construct()
public
__construct(WidgetConfigurationInterface $configuration, ListDataProviderInterface $dataProvider, BackendViewFactory $backendViewFactory[, ButtonProviderInterface|null $buttonProvider = null ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $configuration : WidgetConfigurationInterface
- $dataProvider : ListDataProviderInterface
- $backendViewFactory : BackendViewFactory
- $buttonProvider : ButtonProviderInterface|null = null
- $options : array<string|int, mixed> = []
getSettingsDefinitions()
public
getSettingsDefinitions() : array<string|int, SettingDefinition>
Return values
array<string|int, SettingDefinition>renderWidget()
This method returns the content of a widget. The returned markup will be delivered by an AJAX call and will not be escaped.
public
renderWidget(WidgetContext $context) : WidgetResult
Be aware of XSS and ensure that the content is well encoded.
Parameters
- $context : WidgetContext
Return values
WidgetResultgetItems()
protected
getItems() : array<string|int, mixed>