‪TYPO3CMS  10.4
TYPO3\CMS\Dashboard\Widgets\CtaWidget Class Reference
Inheritance diagram for TYPO3\CMS\Dashboard\Widgets\CtaWidget:
TYPO3\CMS\Dashboard\Widgets\WidgetInterface

Public Member Functions

 __construct (WidgetConfigurationInterface $configuration, StandaloneView $view, $buttonProvider=null, array $options=[])
 
 renderWidgetContent ()
 

Private Attributes

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

Detailed Description

Concrete CTA button implementation

Shows a widget with a CTA button to easily go to a specific page or do a specific action. You can add a button to the widget by defining a button provider.

The following options are available during registration:

  • ‪text string Adds a text to the widget to give some more background information about what a user can expect when clicking the button. You can either enter a normal string or a translation string (eg. LLL:EXT:dashboard/Resources/Private/Language/locallang.xlf:widgets.documentation.gettingStarted.text)
    See also
    ButtonProviderInterface

Definition at line 34 of file CtaWidget.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Dashboard\Widgets\CtaWidget::__construct ( WidgetConfigurationInterface  $configuration,
StandaloneView  $view,
  $buttonProvider = null,
array  $options = [] 
)

Member Function Documentation

◆ renderWidgetContent()

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

Member Data Documentation

◆ $buttonProvider

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

Definition at line 50 of file CtaWidget.php.

Referenced by TYPO3\CMS\Dashboard\Widgets\CtaWidget\__construct().

◆ $configuration

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

Definition at line 38 of file CtaWidget.php.

Referenced by TYPO3\CMS\Dashboard\Widgets\CtaWidget\__construct().

◆ $options

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

Definition at line 46 of file CtaWidget.php.

Referenced by TYPO3\CMS\Dashboard\Widgets\CtaWidget\__construct().

◆ $view

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

Definition at line 42 of file CtaWidget.php.

Referenced by TYPO3\CMS\Dashboard\Widgets\CtaWidget\__construct().