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

Public Member Functions

 __construct (private readonly WidgetConfigurationInterface $configuration, private readonly NumberWithIconDataProviderInterface $dataProvider, private readonly BackendViewFactory $backendViewFactory, private readonly array $options=[],)
 
 setRequest (ServerRequestInterface $request)
 
 renderWidgetContent ()
 
 getOptions ()
 

Private Attributes

ServerRequestInterface $request
 

Detailed Description

Concrete Number with Icon implementation

The widget will show widget with an icon, a number, a title and a subtitle. The number is provided by a data provider.

The following options are available during registration:

  • ‪icon string The icon-identifier of the icon that should be shown in the widget. You should register your icon with the Icon API
  • ‪title string The main title that will be shown in the widget as an explanation of the shown number. You can either enter a normal string or a translation string (eg. LLL:EXT:dashboard/Resources/Private/Language/locallang.xlf:widgets.failedLogins.title)
  • ‪subtitle string The subtitle that will give some additional information about the number and title. You can either enter a normal string or a translation string (eg. LLL:EXT:dashboard/Resources/Private/Language/locallang.xlf:widgets.failedLogins.subtitle)
See also
NumberWithIconDataProviderInterface

Definition at line 41 of file NumberWithIconWidget.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Dashboard\Widgets\NumberWithIconWidget::__construct ( private readonly WidgetConfigurationInterface  $configuration,
private readonly NumberWithIconDataProviderInterface  $dataProvider,
private readonly BackendViewFactory  $backendViewFactory,
private readonly array  $options = [] 
)

Definition at line 45 of file NumberWithIconWidget.php.

Member Function Documentation

◆ getOptions()

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

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

Implements TYPO3\CMS\Dashboard\Widgets\WidgetInterface.

Definition at line 71 of file NumberWithIconWidget.php.

◆ renderWidgetContent()

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

◆ setRequest()

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

Member Data Documentation

◆ $request

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