IDashboardWidget

interface OCP\Dashboard\IDashboardWidget
Interface IDashboardWidget
This interface is used to create a widget: the widget must implement this
interface and be defined in appinfo/info.xml:

<dashboard>
<widget>OCA\YourApp\YourWidget</widget>
</dashboard>

Multiple widget can be defined in the same appinfo/info.xml.
Source:lib/public/Dashboard/IDashboardWidget.php#52

Methods

public OCP\Dashboard\IDashboardWidget::getId()
Should returns the (unique) Id of the widget.
Source:lib/public/Dashboard/IDashboardWidget.php#62
Since:15.0.0
Deprecated:20.0.0
Returns:string
public OCP\Dashboard\IDashboardWidget::getName()
Should returns the [display] name of the widget.
Source:lib/public/Dashboard/IDashboardWidget.php#73
Since:15.0.0
Deprecated:20.0.0
Returns:string
public OCP\Dashboard\IDashboardWidget::getDescription()
Should returns some text describing the widget.
This description is displayed in the listing of the available widgets.
Source:lib/public/Dashboard/IDashboardWidget.php#85
Since:15.0.0
Deprecated:20.0.0
Returns:string
public OCP\Dashboard\IDashboardWidget::getWidgetTemplate()
Must generate and return a WidgetTemplate that define important stuff
about the Widget: icon, content, css or javascript.
Source:lib/public/Dashboard/IDashboardWidget.php#99
See:\OCP\Dashboard\Model\WidgetTemplate
Since:15.0.0
Deprecated:20.0.0
Returns:\OCP\Dashboard\Model\WidgetTemplate
public OCP\Dashboard\IDashboardWidget::getWidgetSetup()
Must create and return a WidgetSetup containing the general setup of
the widget
Source:lib/public/Dashboard/IDashboardWidget.php#113
See:\OCP\Dashboard\Model\WidgetSetup
Since:15.0.0
Deprecated:20.0.0
Returns:\OCP\Dashboard\Model\WidgetSetup
public OCP\Dashboard\IDashboardWidget::loadWidget($settings)
This method is called when a widget is loaded on the dashboard.
A widget is ‘loaded on the dashboard’ when one of these conditions
occurs:

- the user is adding the widget on his dashboard,
- the user already added the widget on his dashboard and he is opening
the dashboard app.
Source:

lib/public/Dashboard/IDashboardWidget.php#132

Parameters:
See:

\OCP\Dashboard\Model\IWidgetConfig

Since:

15.0.0

Deprecated:

20.0.0

public OCP\Dashboard\IDashboardWidget::requestWidget($request)
This method s executed when the widget call the net.requestWidget()
from the Javascript API.
This is used by the frontend to communicate with the backend.
Source:

lib/public/Dashboard/IDashboardWidget.php#148

Parameters:
See:

\OCP\Dashboard\Model\IWidgetRequest

Since:

15.0.0

Deprecated:

20.0.0