‪TYPO3CMS  ‪main
TYPO3\CMS\Dashboard\Widgets\DoughnutChartWidget Class Reference
Inheritance diagram for TYPO3\CMS\Dashboard\Widgets\DoughnutChartWidget:
TYPO3\CMS\Dashboard\Widgets\WidgetInterface TYPO3\CMS\Dashboard\Widgets\RequestAwareWidgetInterface TYPO3\CMS\Dashboard\Widgets\EventDataInterface TYPO3\CMS\Dashboard\Widgets\AdditionalCssInterface TYPO3\CMS\Dashboard\Widgets\JavaScriptInterface

Public Member Functions

 __construct (private readonly WidgetConfigurationInterface $configuration, private readonly ChartDataProviderInterface $dataProvider, private readonly BackendViewFactory $backendViewFactory, private readonly ?ButtonProviderInterface $buttonProvider=null, private readonly array $options=[],)
 
 setRequest (ServerRequestInterface $request)
 
 renderWidgetContent ()
 
 getEventData ()
 
 getCssFiles ()
 
 getJavaScriptModuleInstructions ()
 
 getOptions ()
 

Private Attributes

ServerRequestInterface $request
 

Detailed Description

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

See also
ChartDataProviderInterface
ButtonProviderInterface

Definition at line 35 of file DoughnutChartWidget.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Dashboard\Widgets\DoughnutChartWidget::__construct ( private readonly WidgetConfigurationInterface  $configuration,
private readonly ChartDataProviderInterface  $dataProvider,
private readonly BackendViewFactory  $backendViewFactory,
private readonly ?ButtonProviderInterface  $buttonProvider = null,
private readonly array  $options = [] 
)

Definition at line 39 of file DoughnutChartWidget.php.

Member Function Documentation

◆ getCssFiles()

TYPO3\CMS\Dashboard\Widgets\DoughnutChartWidget::getCssFiles ( )

This method returns an array with paths to required CSS files. e.g. ['EXT:myext/Resources/Public/Css/my_widget.css']

Implements TYPO3\CMS\Dashboard\Widgets\AdditionalCssInterface.

Definition at line 83 of file DoughnutChartWidget.php.

◆ getEventData()

TYPO3\CMS\Dashboard\Widgets\DoughnutChartWidget::getEventData ( )

This method returns data which should be sent to the widget as JSON encoded value.

Implements TYPO3\CMS\Dashboard\Widgets\EventDataInterface.

Definition at line 63 of file DoughnutChartWidget.php.

◆ getJavaScriptModuleInstructions()

TYPO3\CMS\Dashboard\Widgets\DoughnutChartWidget::getJavaScriptModuleInstructions ( )
Returns
‪list<JavaScriptModuleInstruction>

Implements TYPO3\CMS\Dashboard\Widgets\JavaScriptInterface.

Definition at line 88 of file DoughnutChartWidget.php.

References TYPO3\CMS\Core\Page\JavaScriptModuleInstruction\create().

◆ getOptions()

TYPO3\CMS\Dashboard\Widgets\DoughnutChartWidget::getOptions ( )

This method returns the options of the widget as set in the registration.

Implements TYPO3\CMS\Dashboard\Widgets\WidgetInterface.

Definition at line 96 of file DoughnutChartWidget.php.

◆ renderWidgetContent()

TYPO3\CMS\Dashboard\Widgets\DoughnutChartWidget::renderWidgetContent ( )

This method returns the content of a widget. The returned markup will be delivered by an AJAX call and will not be escaped. Be aware of XSS and ensure that the content is well encoded.

Implements TYPO3\CMS\Dashboard\Widgets\WidgetInterface.

Definition at line 52 of file DoughnutChartWidget.php.

◆ setRequest()

TYPO3\CMS\Dashboard\Widgets\DoughnutChartWidget::setRequest ( ServerRequestInterface  $request)

Member Data Documentation

◆ $request

ServerRequestInterface TYPO3\CMS\Dashboard\Widgets\DoughnutChartWidget::$request
private