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

Public Member Functions

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

Protected Member Functions

 getRssItems ()
 

Private Attributes

readonly array $options
 
ServerRequestInterface $request
 

Detailed Description

Concrete RSS widget implementation

The widget will show a certain number of items of the given RSS feed. The feed will be set by the feedUrl option. You can add a button to the widget by defining a button provider.

The following options are available during registration:

  • ‪feedUrl string Defines the URL or file providing the RSS Feed. This is read by the widget in order to fetch entries to show.
  • ‪limit int default: 5 Defines how many RSS items should be shown.
  • ‪lifetime int default: 43200 Defines how long to wait, in seconds, until fetching RSS Feed again
See also
ButtonProviderInterface

Definition at line 39 of file RssWidget.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 47 of file RssWidget.php.

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

Member Function Documentation

◆ getOptions()

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

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

Implements TYPO3\CMS\Dashboard\Widgets\WidgetInterface.

Definition at line 114 of file RssWidget.php.

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

◆ getRssItems()

TYPO3\CMS\Dashboard\Widgets\RssWidget::getRssItems ( )
protected

◆ renderWidgetContent()

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

References TYPO3\CMS\Dashboard\Widgets\RssWidget\getRssItems().

◆ setRequest()

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

Member Data Documentation

◆ $options

readonly array TYPO3\CMS\Dashboard\Widgets\RssWidget::$options
private

◆ $request

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

Definition at line 45 of file RssWidget.php.

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