IDashboardManager
Interface IDashboardManager
IDashboardManager should be used to manage widget from the backend. The call can be done from any Service.
Tags
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
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
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
Return values
mixed —getWidgetConfig()
returns the OCP\Dashboard\Model\IWidgetConfig for a widgetId and userId.
public
getWidgetConfig(string $widgetId, string $userId) : IWidgetConfig
Parameters
- $widgetId : string
- $userId : string
Tags
Return values
IWidgetConfig —registerEventsService()
Register a IEventsService.
public
registerEventsService(IEventsService $eventsService) : mixed
Parameters
- $eventsService : IEventsService
Tags
Return values
mixed —registerWidgetsService()
Register a IWidgetsService.
public
registerWidgetsService(IWidgetsService $widgetsService) : mixed
Parameters
- $widgetsService : IWidgetsService