WidgetItem
in package
implements
JsonSerializable
FinalYes
Interface WidgetItem
This class is used by IAPIWidget interface. It represents an widget item data that can be provided to clients via the Dashboard API
Tags
Table of Contents
Interfaces
- JsonSerializable
Properties
- $iconUrl : string
- $link : string
- $overlayIconUrl : string
- Overlay icon to show in the bottom right corner of {@see $iconUrl}
- $sinceId : string
- $subtitle : string
- $title : string
Methods
- __construct() : mixed
- WidgetItem constructor
- getIconUrl() : string
- Get the item icon URL The icon should be a square svg or a jpg/png of at least 44x44px
- getLink() : string
- Get the item link
- getOverlayIconUrl() : string
- Get the overlay icon url
- getSinceId() : string
- Get the item since ID
- getSubtitle() : string
- Get the item subtitle
- getTitle() : string
- Get the item title
- jsonSerialize() : array{subtitle: string, title: string, link: string, iconUrl: string, overlayIconUrl: string, sinceId: string}
Properties
$iconUrl
private
string
$iconUrl
= ''
$link
private
string
$link
= ''
$overlayIconUrl
Overlay icon to show in the bottom right corner of {@see $iconUrl}
private
string
$overlayIconUrl
= ''
Tags
$sinceId
private
string
$sinceId
= ''
Timestamp or ID used by the dashboard API to avoid getting already retrieved items
$subtitle
private
string
$subtitle
= ''
$title
private
string
$title
= ''
Methods
__construct()
WidgetItem constructor
public
__construct([string $title = '' ][, string $subtitle = '' ][, string $link = '' ][, string $iconUrl = '' ][, string $sinceId = '' ][, string $overlayIconUrl = '' ]) : mixed
Parameters
- $title : string = ''
- $subtitle : string = ''
- $link : string = ''
- $iconUrl : string = ''
- $sinceId : string = ''
- $overlayIconUrl : string = ''
Tags
getIconUrl()
Get the item icon URL The icon should be a square svg or a jpg/png of at least 44x44px
public
getIconUrl() : string
Tags
Return values
stringgetLink()
Get the item link
public
getLink() : string
Tags
Return values
stringgetOverlayIconUrl()
Get the overlay icon url
public
getOverlayIconUrl() : string
Tags
Return values
stringgetSinceId()
Get the item since ID
public
getSinceId() : string
Tags
Return values
stringgetSubtitle()
Get the item subtitle
public
getSubtitle() : string
Tags
Return values
stringgetTitle()
Get the item title
public
getTitle() : string
Tags
Return values
stringjsonSerialize()
public
jsonSerialize() : array{subtitle: string, title: string, link: string, iconUrl: string, overlayIconUrl: string, sinceId: string}