CtaWidget implements WidgetInterface
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)
Tags
Table of Contents
Interfaces
- WidgetInterface
- The WidgetInterface is the base interface for all kind of widgets.
Methods
- __construct() : mixed
- getOptions() : array<string|int, mixed>
- renderWidgetContent() : string
- This method returns the content of a widget. The returned markup will be delivered by an AJAX call and will not be escaped.
Methods
__construct()
public
__construct(WidgetConfigurationInterface $configuration, StandaloneView $view[, mixed $buttonProvider = null ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $configuration : WidgetConfigurationInterface
- $view : StandaloneView
- $buttonProvider : mixed = null
- $options : array<string|int, mixed> = []
getOptions()
public
getOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>renderWidgetContent()
This method returns the content of a widget. The returned markup will be delivered by an AJAX call and will not be escaped.
public
renderWidgetContent() : string
Be aware of XSS and ensure that the content is well encoded.