Nextcloud PHP API (stable18)

IDashboardManager

Interface IDashboardManager

IDashboardManager should be used to manage widget from the backend. The call can be done from any Service.

Tags
since
15.0.0

Table of Contents

createGlobalEvent()  : mixed
Create push notifications for everyone. (ie. createUsersEvent())
createGroupsEvent()  : mixed
Create push notifications for groups. (ie. createUsersEvent())
createUsersEvent()  : mixed
Create push notifications for users.
getWidgetConfig()  : IWidgetConfig
returns the OCP\Dashboard\Model\IWidgetConfig for a widgetId and userId.
registerEventsService()  : mixed
Register a IEventsService.
registerWidgetsService()  : mixed
Register a IWidgetsService.

Methods

createGlobalEvent()

Create push notifications for everyone. (ie. createUsersEvent())

public createGlobalEvent(string $widgetId, array $payload[, string $uniqueId = '' ]) : mixed
Parameters
$widgetId : string
$payload : array
$uniqueId : string = ''
Tags
since
15.0.0
throws
DashboardAppNotAvailableException
Return values
mixed

createGroupsEvent()

Create push notifications for groups. (ie. createUsersEvent())

public createGroupsEvent(string $widgetId, array $groups, array $payload[, string $uniqueId = '' ]) : mixed
Parameters
$widgetId : string
$groups : array
$payload : array
$uniqueId : string = ''
Tags
since
15.0.0
throws
DashboardAppNotAvailableException
Return values
mixed

createUsersEvent()

Create push notifications for users.

public createUsersEvent(string $widgetId, array $users, array $payload[, string $uniqueId = '' ]) : mixed

$payload is an array that will be send to the Javascript method called on push. $uniqueId needs to be used if you send the push to multiples users and multiples groups so that one user does not have duplicate notifications.

Push notifications are created in database and broadcast to user that are running dashboard.

Parameters
$widgetId : string
$users : array
$payload : array
$uniqueId : string = ''
Tags
since
15.0.0
throws
DashboardAppNotAvailableException
Return values
mixed

Search results