‪TYPO3CMS  ‪main
TYPO3\CMS\Dashboard\Widgets\BarChartWidget Class Reference
Inheritance diagram for TYPO3\CMS\Dashboard\Widgets\BarChartWidget:
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 Bar Chart widget implementation

Shows a widget with a bar 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 BarChartWidget.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Dashboard\Widgets\BarChartWidget::__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 BarChartWidget.php.

Member Function Documentation

◆ getCssFiles()

TYPO3\CMS\Dashboard\Widgets\BarChartWidget::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 93 of file BarChartWidget.php.

◆ getEventData()

TYPO3\CMS\Dashboard\Widgets\BarChartWidget::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 BarChartWidget.php.

◆ getJavaScriptModuleInstructions()

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

Implements TYPO3\CMS\Dashboard\Widgets\JavaScriptInterface.

Definition at line 98 of file BarChartWidget.php.

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

◆ getOptions()

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

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

Implements TYPO3\CMS\Dashboard\Widgets\WidgetInterface.

Definition at line 106 of file BarChartWidget.php.

◆ renderWidgetContent()

TYPO3\CMS\Dashboard\Widgets\BarChartWidget::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 BarChartWidget.php.

◆ setRequest()

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

Member Data Documentation

◆ $request

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