WidgetTemplate¶
-
class
OCP\Dashboard\Model\
WidgetTemplate
¶ - Interface WidgetTemplateA widget must create an WidgetTemplate object and returns it in theIDashboardWidget::getWidgetTemplate method.
Source: lib/public/Dashboard/Model/WidgetTemplate.php#44 Implements: JsonSerializable
Properties¶
Methods¶
-
public
OCP\Dashboard\Model\WidgetTemplate::
getIcon
()¶ - Get the icon class of the widget.
Source: lib/public/Dashboard/Model/WidgetTemplate.php#74 Since: 15.0.0 Deprecated: 20.0.0 Returns: string
-
public
OCP\Dashboard\Model\WidgetTemplate::
setIcon
($icon)¶ - Set the icon class of the widget.This class must be defined in one of the CSS file used by the widget.
Source: Parameters: - $icon (string)
See: \OCP\Dashboard\Model\addCss
Since: 15.0.0
Deprecated: 20.0.0
Returns:
-
public
OCP\Dashboard\Model\WidgetTemplate::
getCss
()¶ - Get CSS files to be included when displaying a widget
Source: lib/public/Dashboard/Model/WidgetTemplate.php#105 Since: 15.0.0 Deprecated: 20.0.0 Returns: array
-
public
OCP\Dashboard\Model\WidgetTemplate::
setCss
($css)¶ - path and name of CSS files
Source: Parameters: - $css (array)
Since: 15.0.0
Deprecated: 20.0.0
Returns:
-
public
OCP\Dashboard\Model\WidgetTemplate::
addCss
($css)¶ - Add a CSS file to be included when displaying a widget.
Source: Parameters: - $css (string)
Since: 15.0.0
Deprecated: 20.0.0
Returns:
-
public
OCP\Dashboard\Model\WidgetTemplate::
getJs
()¶ - Get JS files to be included when loading a widget
Source: lib/public/Dashboard/Model/WidgetTemplate.php#149 Since: 15.0.0 Deprecated: 20.0.0 Returns: array
-
public
OCP\Dashboard\Model\WidgetTemplate::
setJs
($js)¶ - Set an array of JS files to be included when loading a widget.
Source: Parameters: - $js (array)
Since: 15.0.0
Deprecated: 20.0.0
Returns:
-
public
OCP\Dashboard\Model\WidgetTemplate::
addJs
($js)¶ - Add a JS file to be included when loading a widget.
Source: Parameters: - $js (string)
Since: 15.0.0
Deprecated: 20.0.0
Returns:
-
public
OCP\Dashboard\Model\WidgetTemplate::
getContent
()¶ - Get the HTML file that contains the content of the widget.
Source: lib/public/Dashboard/Model/WidgetTemplate.php#193 Since: 15.0.0 Deprecated: 20.0.0 Returns: string
-
public
OCP\Dashboard\Model\WidgetTemplate::
setContent
($content)¶ - Set the HTML file that contains the content of the widget.
Source: Parameters: - $content (string)
Since: 15.0.0
Deprecated: 20.0.0
Returns:
-
public
OCP\Dashboard\Model\WidgetTemplate::
getInitFunction
()¶ - Get the JS function to be called when loading the widget.
Source: lib/public/Dashboard/Model/WidgetTemplate.php#221 Since: 15.0.0 Deprecated: 20.0.0 Returns: string
-
public
OCP\Dashboard\Model\WidgetTemplate::
setInitFunction
($function)¶ - JavaScript function to be called when loading the widget on thedashboard
Source: Parameters: - $function (string)
Since: 15.0.0
Deprecated: 20.0.0
Returns:
-
public
OCP\Dashboard\Model\WidgetTemplate::
getSettings
()¶ - Get all WidgetSetting defined for the widget.
Source: lib/public/Dashboard/Model/WidgetTemplate.php#252 See: \OCP\Dashboard\Model\WidgetSetting
Since: 15.0.0 Deprecated: 20.0.0 Returns: \OCP\Dashboard\Model\WidgetSetting[]
-
public
OCP\Dashboard\Model\WidgetTemplate::
setSettings
($settings)¶ - Define all WidgetSetting for the widget.
Source: Parameters: - $settings (
OCP\Dashboard\Model\WidgetSetting[]
)
Since: 15.0.0
Deprecated: 20.0.0
See: Returns: - $settings (
-
public
OCP\Dashboard\Model\WidgetTemplate::
addSetting
($setting)¶ - Add a WidgetSetting.
Source: Parameters: - $setting (
OCP\Dashboard\Model\WidgetSetting
)
See: Since: 15.0.0
Deprecated: 20.0.0
Returns: - $setting (
-
public
OCP\Dashboard\Model\WidgetTemplate::
getSetting
($key)¶ - Get a WidgetSetting by its name
Source: Parameters: - $key (string)
See: Since: 15.0.0
Deprecated: 20.0.0
Returns:
-
public
OCP\Dashboard\Model\WidgetTemplate::
jsonSerialize
()¶ Source: lib/public/Dashboard/Model/WidgetTemplate.php#319 Since: 15.0.0 Deprecated: 20.0.0 Returns: array