‪TYPO3CMS  11.5
TYPO3\CMS\Dashboard\Widgets\BarChartWidget Class Reference
Inheritance diagram for TYPO3\CMS\Dashboard\Widgets\BarChartWidget:
TYPO3\CMS\Dashboard\Widgets\WidgetInterface TYPO3\CMS\Dashboard\Widgets\EventDataInterface TYPO3\CMS\Dashboard\Widgets\AdditionalCssInterface TYPO3\CMS\Dashboard\Widgets\JavaScriptInterface

Public Member Functions

 __construct (WidgetConfigurationInterface $configuration, ChartDataProviderInterface $dataProvider, StandaloneView $view, $buttonProvider=null, array $options=[])
 
 renderWidgetContent ()
 
 getEventData ()
 
 getCssFiles ()
 
 getJavaScriptModuleInstructions ()
 
array getOptions ()
 

Private Attributes

WidgetConfigurationInterface $configuration
 
ChartDataProviderInterface $dataProvider
 
StandaloneView $view
 
ButtonProviderInterface null $buttonProvider
 
array $options
 

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 34 of file BarChartWidget.php.

Constructor & Destructor Documentation

◆ __construct()

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']

Returns
‪array

Implements TYPO3\CMS\Dashboard\Widgets\AdditionalCssInterface.

Definition at line 113 of file BarChartWidget.php.

◆ getEventData()

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

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

Returns
‪array

Implements TYPO3\CMS\Dashboard\Widgets\EventDataInterface.

Definition at line 81 of file BarChartWidget.php.

◆ getJavaScriptModuleInstructions()

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

Implements TYPO3\CMS\Dashboard\Widgets\JavaScriptInterface.

Definition at line 118 of file BarChartWidget.php.

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

◆ getOptions()

array TYPO3\CMS\Dashboard\Widgets\BarChartWidget::getOptions ( )
Returns
‪array

Definition at line 129 of file BarChartWidget.php.

References TYPO3\CMS\Dashboard\Widgets\BarChartWidget\$options.

◆ 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.

Returns
‪string

Implements TYPO3\CMS\Dashboard\Widgets\WidgetInterface.

Definition at line 70 of file BarChartWidget.php.

Member Data Documentation

◆ $buttonProvider

ButtonProviderInterface null TYPO3\CMS\Dashboard\Widgets\BarChartWidget::$buttonProvider
private

◆ $configuration

WidgetConfigurationInterface TYPO3\CMS\Dashboard\Widgets\BarChartWidget::$configuration
private

◆ $dataProvider

ChartDataProviderInterface TYPO3\CMS\Dashboard\Widgets\BarChartWidget::$dataProvider
private

◆ $options

array TYPO3\CMS\Dashboard\Widgets\BarChartWidget::$options
private

◆ $view

StandaloneView TYPO3\CMS\Dashboard\Widgets\BarChartWidget::$view
private