Nextcloud PHP API (master)

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
see
IAPIWidget::getItems
since
22.0.0

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

$overlayIconUrl

Overlay icon to show in the bottom right corner of {@see $iconUrl}

private string $overlayIconUrl = ''
Tags
since
27.1.0

$sinceId

private string $sinceId = ''

Timestamp or ID used by the dashboard API to avoid getting already retrieved items

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
since
22.0.0

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
since
22.0.0
Return values
string

Get the item link

public getLink() : string
Tags
since
22.0.0
Return values
string

getOverlayIconUrl()

Get the overlay icon url

public getOverlayIconUrl() : string
Tags
since
27.1.0
Return values
string

getSinceId()

Get the item since ID

public getSinceId() : string
Tags
since
22.0.0
Return values
string

getSubtitle()

Get the item subtitle

public getSubtitle() : string
Tags
since
22.0.0
Return values
string

getTitle()

Get the item title

public getTitle() : string
Tags
since
22.0.0
Return values
string

jsonSerialize()

public jsonSerialize() : array{subtitle: string, title: string, link: string, iconUrl: string, overlayIconUrl: string, sinceId: string}
Tags
since
22.0.0
Return values
array{subtitle: string, title: string, link: string, iconUrl: string, overlayIconUrl: string, sinceId: string}

        
On this page

Search results