IDashboardManager

interface OCP\Dashboard\IDashboardManager
Interface IDashboardManager
IDashboardManager should be used to manage widget from the backend.
The call can be done from any Service.
Implemented by:OC\Dashboard\DashboardManager
Source:lib/public/Dashboard/IDashboardManager.php#45

Methods

public OCP\Dashboard\IDashboardManager::registerWidgetsService($widgetsService)
Register a IWidgetsService.
Source:

lib/public/Dashboard/IDashboardManager.php#56

Parameters:
Since:

15.0.0

Deprecated:

20.0.0

public OCP\Dashboard\IDashboardManager::registerEventsService($eventsService)
Register a IEventsService.
Source:

lib/public/Dashboard/IDashboardManager.php#67

Parameters:
Since:

15.0.0

Deprecated:

20.0.0

public OCP\Dashboard\IDashboardManager::getWidgetConfig($widgetId, $userId)
returns the OCP\Dashboard\Model\IWidgetConfig for a widgetId and userId.
Source:

lib/public/Dashboard/IDashboardManager.php#84

Parameters:
  • $widgetId (string)
  • $userId (string)
See:

\OCP\Dashboard\Model\IWidgetConfig

Since:

15.0.0

Deprecated:

20.0.0

Throws:

\OCP\Dashboard\Exceptions\DashboardAppNotAvailableException

Returns:

\OCP\Dashboard\Model\IWidgetConfig

public OCP\Dashboard\IDashboardManager::createUsersEvent($widgetId, $users, $payload, $uniqueId="")
Create push notifications for users.
$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.
Source:

lib/public/Dashboard/IDashboardManager.php#107

Parameters:
  • $widgetId (string)
  • $users (array)
  • $payload (array)
  • $uniqueId (string)
Since:

15.0.0

Deprecated:

20.0.0

Throws:

\OCP\Dashboard\Exceptions\DashboardAppNotAvailableException

public OCP\Dashboard\IDashboardManager::createGroupsEvent($widgetId, $groups, $payload, $uniqueId="")
Create push notifications for groups. (ie. createUsersEvent())
Source:

lib/public/Dashboard/IDashboardManager.php#122

Parameters:
  • $widgetId (string)
  • $groups (array)
  • $payload (array)
  • $uniqueId (string)
Since:

15.0.0

Deprecated:

20.0.0

Throws:

\OCP\Dashboard\Exceptions\DashboardAppNotAvailableException

public OCP\Dashboard\IDashboardManager::createGlobalEvent($widgetId, $payload, $uniqueId="")
Create push notifications for everyone. (ie. createUsersEvent())
Source:

lib/public/Dashboard/IDashboardManager.php#136

Parameters:
  • $widgetId (string)
  • $payload (array)
  • $uniqueId (string)
Since:

15.0.0

Deprecated:

20.0.0

Throws:

\OCP\Dashboard\Exceptions\DashboardAppNotAvailableException