Nextcloud PHP API (stable18)

IWidgetRequest

Interface IWidgetRequest

WidgetRequest are created by the Dashboard App and used to communicate from the frontend to the backend. The object is send to the WidgetClass using IDashboardWidget::requestWidget

Tags
see
IDashboardWidget::requestWidget
since
15.0.0

Table of Contents

addResult()  : $this
add a result (as string)
addResultArray()  : $this
add a result (as array)
getRequest()  : string
Get the 'request' string sent by the request from the front-end with the format:
getResult()  : array
Returns the result.
getValue()  : string
Get the 'value' string sent by the request from the front-end.
getWidget()  : IDashboardWidget
Get the WidgetClass.
getWidgetId()  : string
Get the widgetId.

Methods

addResult()

add a result (as string)

public addResult(string $key, string $result) : $this
Parameters
$key : string
$result : string
Tags
since
15.0.0
Return values
$this

addResultArray()

add a result (as array)

public addResultArray(string $key, array $result) : $this
Parameters
$key : string
$result : array
Tags
since
15.0.0
Return values
$this

getRequest()

Get the 'request' string sent by the request from the front-end with the format:

public getRequest() : string

net.requestWidget( { widget: widgetId, request: request, value: value }, callback);

Tags
since
15.0.0
Return values
string

getResult()

Returns the result.

public getResult() : array
Tags
since
15.0.0
Return values
array

getValue()

Get the 'value' string sent by the request from the front-end.

public getValue() : string
Tags
see
getRequest
since
15.0.0
Return values
string

getWidgetId()

Get the widgetId.

public getWidgetId() : string
Tags
since
15.0.0
Return values
string

Search results