‪TYPO3CMS  ‪main
TYPO3\CMS\Dashboard\Widgets\ListWidget Class Reference
Inheritance diagram for TYPO3\CMS\Dashboard\Widgets\ListWidget:
TYPO3\CMS\Dashboard\Widgets\WidgetInterface TYPO3\CMS\Dashboard\Widgets\RequestAwareWidgetInterface

Public Member Functions

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

Protected Member Functions

 getItems ()
 

Private Attributes

ServerRequestInterface $request
 

Detailed Description

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

See also
ListDataProviderInterface
ButtonProviderInterface

Definition at line 34 of file ListWidget.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 38 of file ListWidget.php.

Member Function Documentation

◆ getItems()

TYPO3\CMS\Dashboard\Widgets\ListWidget::getItems ( )
protected

◆ getOptions()

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

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

Implements TYPO3\CMS\Dashboard\Widgets\WidgetInterface.

Definition at line 68 of file ListWidget.php.

◆ renderWidgetContent()

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

References TYPO3\CMS\Dashboard\Widgets\ListWidget\getItems().

◆ setRequest()

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

Member Data Documentation

◆ $request

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

Definition at line 36 of file ListWidget.php.

Referenced by TYPO3\CMS\Dashboard\Widgets\ListWidget\setRequest().