CTA Button Widget
Widgets using this class will show a CTA (=Call to action) 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.
You can use this kind of widget to link to for example a manual or to an important website that is used a lot by the users.
Example
services:
dashboard.widget.docGettingStarted:
class: 'TYPO3\CMS\Dashboard\Widgets\CtaWidget'
arguments:
$buttonProvider: '@dashboard.buttons.docGettingStarted'
$options:
text: 'LLL:EXT:dashboard/Resources/Private/Language/locallang.xlf:widgets.documentation.gettingStarted.text'
tags:
- name: dashboard.widget
identifier: 'docGettingStarted'
groupNames: 'documentation'
title: 'LLL:EXT:dashboard/Resources/Private/Language/locallang.xlf:widgets.documentation.gettingStarted.title'
description: 'LLL:EXT:dashboard/Resources/Private/Language/locallang.xlf:widgets.documentation.gettingStarted.description'
iconIdentifier: 'content-widget-text'
height: 'small'
Options
refreshAvailable
-
refresh
Available -
- Type
- boolean
- Default
false
Boolean value, either
false
ortrue
.Provides a refresh button to backend users to refresh the widget. If the option is omitted
false
is assumed.
text
-
- Type
- string
- Example
LLL:
EXT: dashboard/ Resources/ Private/ Language/ locallang. xlf: widgets. documentation. getting Started. text
Adds an optional 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.
Dependencies
$buttonProvider
-
Provides the actual button to show within the widget. This button should be provided by a ButtonProvider that implements the interface
Button
.Provider Interface See Adding button to Widget for further info and configuration options.