A text input user interface element for backup settings.
More...
|
static | make (backup_setting $setting, $type, $label, array $attributes=null, array $options=null) |
| Creates a new backup setting ui based on the setting it is given. More...
|
|
|
const | NAME_PREFIX = 'setting_' |
| Prefix applied to all inputs/selects.
|
|
|
array | $attributes = array() |
| An array of HTML attributes to apply to this setting.
|
|
pix_icon | $icon = false |
| An icon to display next to this setting in the UI.
|
|
string | $label |
| The label for the setting.
|
|
string | $name |
| The name of the setting.
|
|
array | $options = array() |
| An array of options relating to this setting.
|
|
base_setting backup_setting | $setting |
| The setting this UI belongs to (parent reference)
|
|
int | $type = backup_setting::UI_HTML_TEXTFIELD |
|
A text input user interface element for backup settings.
- Copyright
- 2010 Sam Hemelryk
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ apply_options()
backup_setting_ui::apply_options |
( |
array |
$properties | ) |
|
|
inherited |
Applies config options to a given properties array and then returns it.
- Parameters
-
- Return values
-
◆ destroy()
base_setting_ui::destroy |
( |
| ) |
|
|
inherited |
Destroy all circular references.
It helps PHP 5.2 a lot!
◆ get_attributes()
base_setting_ui::get_attributes |
( |
| ) |
|
|
inherited |
Gets the HTML attributes for this item.
- Return values
-
◆ get_element_properties()
◆ get_icon()
base_setting_ui::get_icon |
( |
| ) |
|
|
inherited |
Returns the icon to display next to this item, or false if there isn't one.
- Return values
-
◆ get_label() [1/2]
base_setting_ui::get_label |
( |
| ) |
|
|
inherited |
Gets the name of this item including its prefix.
- Return values
-
◆ get_label() [2/2]
backup_setting_ui::get_label |
( |
base_task |
$task = null | ) |
|
|
inherited |
Gets the label for this item.
- Parameters
-
base_task | $task | Optional, if provided and the setting is an include $task is used to set the setting label |
- Return values
-
◆ get_name()
base_setting_ui::get_name |
( |
| ) |
|
|
inherited |
Gets the name of this item including its prefix.
- Return values
-
◆ get_param_validation()
base_setting_ui::get_param_validation |
( |
| ) |
|
|
inherited |
Gets the the PARAM_XXXX validation to be applied to the setting.
return string The PARAM_XXXX constant of null if the setting type is not defined
◆ get_static_value()
base_setting_ui::get_static_value |
( |
| ) |
|
|
inherited |
◆ get_type()
base_setting_ui::get_type |
( |
| ) |
|
|
inherited |
Gets the type of this element.
- Return values
-
◆ get_value()
base_setting_ui::get_value |
( |
| ) |
|
|
inherited |
Gets the value of this setting.
- Return values
-
◆ is_changeable()
backup_setting_ui::is_changeable |
( |
|
$level = null | ) |
|
|
inherited |
Returns true if the setting is changeable.
A setting is changeable if it meets either of the two following conditions.
- The setting is not locked
- The setting is locked but only by settings that are of the same level (same page)
Condition 2 is really why we have this function
- Parameters
-
int | $level | Optional, if provided only depedency_settings below or equal to this level are considered, when checking if the ui_setting is changeable. Although dependencies might cause a lock on this setting, they could be changeable in the same view. |
- Return values
-
Reimplemented in backup_setting_ui_checkbox, and backup_setting_ui_select.
◆ make()
static backup_setting_ui::make |
( |
backup_setting |
$setting, |
|
|
|
$type, |
|
|
|
$label, |
|
|
array |
$attributes = null , |
|
|
array |
$options = null |
|
) |
| |
|
staticfinalinherited |
Creates a new backup setting ui based on the setting it is given.
- Exceptions
-
- Parameters
-
backup_setting | $setting | |
int | $type | The backup_setting UI type. One of backup_setting::UI_*; |
string | $label | The label to display with the setting ui |
array | $attributes | Array of HTML attributes to apply to the element |
array | $options | Array of options to apply to the setting ui object |
- Return values
-
backup_setting_ui_text|backup_setting_ui_checkbox|backup_setting_ui_select|backup_setting_ui_radio | |
◆ set_icon()
base_setting_ui::set_icon |
( |
pix_icon |
$icon | ) |
|
|
inherited |
Sets the icon to display next to this item.
- Parameters
-
◆ set_label()
base_setting_ui::set_label |
( |
|
$label | ) |
|
|
inherited |
Sets the label.
- Exceptions
-
- Parameters
-
The documentation for this class was generated from the following file: