IDashboardWidget¶
-
interface
OCP\Dashboard\
IDashboardWidget
¶ - Interface IDashboardWidgetThis interface is used to create a widget: the widget must implement thisinterface 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 stuffabout 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 ofthe 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 conditionsoccurs:- the user is adding the widget on his dashboard,- the user already added the widget on his dashboard and he is openingthe dashboard app.
Source: Parameters: - $settings (
OCP\Dashboard\Model\IWidgetConfig
)
See: Since: 15.0.0
Deprecated: 20.0.0
- $settings (
-
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: Parameters: - $request (
OCP\Dashboard\Model\IWidgetRequest
)
See: Since: 15.0.0
Deprecated: 20.0.0
- $request (