Nextcloud PHP API (master)

IReloadableWidget extends IAPIWidgetV2

Allow {@see IAPIWidgetV2} to reload their items

Tags
since
27.1.0

Table of Contents

Methods

getIconClass()  : string
CSS class that shows the widget icon (should be colored black or not have a color)
getId()  : string
Get a unique identifier for the widget
getItemsV2()  : WidgetItems
Items to render in the widget
getOrder()  : int
getReloadInterval()  : int
Periodic interval in seconds in which to reload the widget's items
getTitle()  : string
getUrl()  : string|null
load()  : void
Execute widget bootstrap code like loading scripts and providing initial state

Methods

getIconClass()

CSS class that shows the widget icon (should be colored black or not have a color)

public getIconClass() : string

The icon will be inverted automatically in mobile clients and when using dark mode. Therefore, it is NOT recommended to use a css class that sets the background with: var(--icon-…) as those will adapt to dark/bright mode in the web and still be inverted resulting in a dark icon on dark background.

Tags
since
20.0.0
Return values
string

css class that displays an icon next to the widget title

getId()

Get a unique identifier for the widget

public getId() : string

To ensure uniqueness, it is recommended to user the app id or start with the app id followed by a dash.

Tags
since
20.0.0
Return values
string

Unique id that identifies the widget, e.g. the app id. Only use alphanumeric characters, dash and underscore

getItemsV2()

Items to render in the widget

public getItemsV2(string $userId[, string|null $since = null ][, int $limit = 7 ]) : WidgetItems
Parameters
$userId : string
$since : string|null = null
$limit : int = 7
Tags
since
27.1.0
Return values
WidgetItems

getOrder()

public getOrder() : int
Tags
since
20.0.0
Return values
int

Initial order for widget sorting

getReloadInterval()

Periodic interval in seconds in which to reload the widget's items

public getReloadInterval() : int
Tags
since
27.1.0
Return values
int

getTitle()

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

User facing title of the widget

getUrl()

public getUrl() : string|null
Tags
since
20.0.0
Return values
string|null

The absolute url to the apps own view

load()

Execute widget bootstrap code like loading scripts and providing initial state

public load() : void
Tags
since
20.0.0

        
On this page

Search results