DoughnutChartWidget implements WidgetInterface, EventDataInterface, AdditionalCssInterface, JavaScriptInterface
Concrete Doughnut Chart widget implementation
Shows a widget with a doughnut chart. The data for this chart will be provided by the data provider you will set. 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
- WidgetInterface
- The WidgetInterface is the base interface for all kind of widgets.
- EventDataInterface
- In case a widget should provide additional data as JSON payload, the widget must implement this interface.
- AdditionalCssInterface
- In case a widget should provide additional CSS files, the widget must implement this interface.
- JavaScriptInterface
- Provides potential JavaScript declarations to be loaded/initialized for a particular widget.
Methods
- __construct() : mixed
- getCssFiles() : array<string|int, mixed>
- This method returns an array with paths to required CSS files.
- getEventData() : array<string|int, mixed>
- This method returns data which should be send to the widget as JSON encoded value.
- getJavaScriptModuleInstructions() : array<int, JavaScriptModuleInstruction>
- getOptions() : array<string|int, mixed>
- renderWidgetContent() : string
- This method returns the content of a widget. The returned markup will be delivered by an AJAX call and will not be escaped.
Methods
__construct()
public
__construct(WidgetConfigurationInterface $configuration, ChartDataProviderInterface $dataProvider, StandaloneView $view[, mixed $buttonProvider = null ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $configuration : WidgetConfigurationInterface
- $dataProvider : ChartDataProviderInterface
- $view : StandaloneView
- $buttonProvider : mixed = null
- $options : array<string|int, mixed> = []
getCssFiles()
This method returns an array with paths to required CSS files.
public
getCssFiles() : array<string|int, mixed>
e.g. ['EXT:myext/Resources/Public/Css/my_widget.css']
Return values
array<string|int, mixed>getEventData()
This method returns data which should be send to the widget as JSON encoded value.
public
getEventData() : array<string|int, mixed>
Return values
array<string|int, mixed>getJavaScriptModuleInstructions()
public
getJavaScriptModuleInstructions() : array<int, JavaScriptModuleInstruction>
Return values
array<int, JavaScriptModuleInstruction>getOptions()
public
getOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>renderWidgetContent()
This method returns the content of a widget. The returned markup will be delivered by an AJAX call and will not be escaped.
public
renderWidgetContent() : string
Be aware of XSS and ensure that the content is well encoded.