|
Moodle APIs
3.8
Moodle 3.8.6 (Build: 20201109)
|
This class is here for backwards compatibility (terrible name). More...
Public Member Functions | |
| destroy () | |
| Destroy all circular references. More... | |
| enforce () | |
| Enforces the dependency if required. More... | |
| get_dependent_setting () | |
| Gets the dependent setting. More... | |
| get_moodleform_properties () | |
| Returns an array of properties suitable to be used to define a moodleforms disabled command. More... | |
| get_setting () | |
| Gets the primary setting. More... | |
| is_locked () | |
| Returns true if the dependent setting is locked by this setting_dependency. More... | |
| process_change ($changetype, $oldvalue) | |
| Processes a change is setting called by the primary setting. More... | |
Public Attributes | |
| const | DISABLED_CHECKED = 4 |
| const | DISABLED_EMPTY = 6 |
| const | DISABLED_FALSE = 3 |
| const | DISABLED_NOT_CHECKED = 5 |
| const | DISABLED_NOT_EMPTY = 7 |
| const | DISABLED_NOT_VALUE = 1 |
| const | DISABLED_TRUE = 2 |
| const | DISABLED_VALUE = 0 |
| Used to define the type of a dependency. More... | |
Protected Member Functions | |
| evaluate_disabled_condition ($value) | |
| Evaluate the current value of the setting and return true if the dependent setting should be locked or false. More... | |
| process_status_change ($oldstatus) | |
| Processes a status change in the primary setting. More... | |
| process_value_change ($oldvalue) | |
| Processes a value change in the primary setting. More... | |
| process_visibility_change ($oldvisibility) | |
| Processes a visibility change. More... | |
Protected Attributes | |
| mixed | $defaultvalue |
| The default setting. | |
| base_setting | $dependentsetting |
| The dependent setting (secondary) | |
| mixed | $lastvalue |
| The last value the dependent setting had. | |
| base_setting | $setting |
| The parent setting (primary) | |
| mixed | $value |
| The value to compare to. | |
This class is here for backwards compatibility (terrible name).
|
inherited |
Destroy all circular references.
It helps PHP 5.2 a lot!
|
inherited |
Enforces the dependency if required.
| bool | True if there were changes |
Reimplemented from setting_dependency.
|
protectedinherited |
Evaluate the current value of the setting and return true if the dependent setting should be locked or false.
| mixed | $value | The value of the parent setting. |
| bool |
Reimplemented from setting_dependency_disabledif_equals.
|
inherited |
Gets the dependent setting.
| backup_setting |
|
inherited |
Returns an array of properties suitable to be used to define a moodleforms disabled command.
| array |
Reimplemented from setting_dependency_disabledif_equals.
|
inherited |
Gets the primary setting.
| backup_setting |
|
inherited |
Returns true if the dependent setting is locked by this setting_dependency.
| bool |
Reimplemented from setting_dependency.
|
finalinherited |
Processes a change is setting called by the primary setting.
| int | $changetype | |
| mixed | $oldvalue |
| bool |
|
protectedinherited |
Processes a status change in the primary setting.
| mixed | $oldstatus |
| bool |
Reimplemented from setting_dependency.
|
protectedinherited |
Processes a value change in the primary setting.
| mixed | $oldvalue |
| bool |
Reimplemented from setting_dependency.
|
protectedinherited |
Processes a visibility change.
| bool | $oldvisibility |
| bool |
|
inherited |
Used to define the type of a dependency.
Note with these that checked and true, and not checked and false are equal. This is because the terminology differs but the resulting action is the same. Reduces code!