WidgetSetting

class OCP\Dashboard\Model\WidgetSetting
Interface WidgetSetting
Each setting that can be edited by a user should be defined in a
WidgetSetting.

When using this framework, the settings interface is generated by the
Dashboard app.

Each WidgetSetting must be generated and declared in the WidgetTemplate
during the setup of the widget in the IDashboardWidget using addSetting().
Source:lib/public/Dashboard/Model/WidgetSetting.php#52
Implements:JsonSerializable

Constants

TYPE_INPUT = input
Source:lib/public/Dashboard/Model/WidgetSetting.php#53
TYPE_CHECKBOX = checkbox
Source:lib/public/Dashboard/Model/WidgetSetting.php#54

Properties

Methods

public OCP\Dashboard\Model\WidgetSetting::__construct($type="")
WidgetSetting constructor.
Source:

lib/public/Dashboard/Model/WidgetSetting.php#81

Parameters:
  • $type (string)
Since:

15.0.0

Deprecated:

20.0.0

public OCP\Dashboard\Model\WidgetSetting::setName($name)
Set the name of the setting (full string, no space)
Source:

lib/public/Dashboard/Model/WidgetSetting.php#96

Parameters:
  • $name (string)
Since:

15.0.0

Deprecated:

20.0.0

Returns:

\OCP\Dashboard\Model\WidgetSetting

public OCP\Dashboard\Model\WidgetSetting::getName()
Get the name of the setting
Source:lib/public/Dashboard/Model/WidgetSetting.php#110
Since:15.0.0
Deprecated:20.0.0
Returns:string
public OCP\Dashboard\Model\WidgetSetting::setTitle($title)
Set the title/display name of the setting.
Source:

lib/public/Dashboard/Model/WidgetSetting.php#125

Parameters:
  • $title (string)
Since:

15.0.0

Deprecated:

20.0.0

Returns:

\OCP\Dashboard\Model\WidgetSetting

public OCP\Dashboard\Model\WidgetSetting::getTitle()
Get the title of the setting
Source:lib/public/Dashboard/Model/WidgetSetting.php#139
Since:15.0.0
Deprecated:20.0.0
Returns:string
public OCP\Dashboard\Model\WidgetSetting::setType($type)
Set the type of the setting (input, checkbox, .
..)
Source:

lib/public/Dashboard/Model/WidgetSetting.php#154

Parameters:
  • $type (string)
Since:

15.0.0

Deprecated:

20.0.0

Returns:

\OCP\Dashboard\Model\WidgetSetting

public OCP\Dashboard\Model\WidgetSetting::getType()
Get the type of the setting.
Source:lib/public/Dashboard/Model/WidgetSetting.php#168
Since:15.0.0
Deprecated:20.0.0
Returns:string
public OCP\Dashboard\Model\WidgetSetting::setPlaceholder($text)
Set the placeholder (in case of type=input)
Source:

lib/public/Dashboard/Model/WidgetSetting.php#183

Parameters:
  • $text (string)
Since:

15.0.0

Deprecated:

20.0.0

Returns:

\OCP\Dashboard\Model\WidgetSetting

public OCP\Dashboard\Model\WidgetSetting::getPlaceholder()
Get the placeholder.
Source:lib/public/Dashboard/Model/WidgetSetting.php#197
Since:15.0.0
Deprecated:20.0.0
Returns:string
public OCP\Dashboard\Model\WidgetSetting::setDefault($value)
Set the default value of the setting.
Source:

lib/public/Dashboard/Model/WidgetSetting.php#212

Parameters:
  • $value (string)
Since:

15.0.0

Deprecated:

20.0.0

Returns:

\OCP\Dashboard\Model\WidgetSetting

public OCP\Dashboard\Model\WidgetSetting::getDefault()
Get the default value.
Source:lib/public/Dashboard/Model/WidgetSetting.php#226
Since:15.0.0
Deprecated:20.0.0
Returns:string
public OCP\Dashboard\Model\WidgetSetting::jsonSerialize()
Source:lib/public/Dashboard/Model/WidgetSetting.php#237
Since:15.0.0
Deprecated:20.0.0
Returns:array