mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-68729 Admin: Allow validation of admin_setting_configselect
The admin_setting_configselect admin setting did not support validation. It was possible to validate only by using a subclass. This change allows validation by a callback function. It also makes it slightly easier to handle validation in a subclass if you want to do that. The main advantage is for cases where a setting is not generic but is only ever going to be required in one place, and it creates unnecessary clutter to make a new subclass.
This commit is contained in:
parent
f87597aae3
commit
b58009596f
2 changed files with 40 additions and 0 deletions
|
@ -34,6 +34,8 @@ information provided here is intended especially for developers.
|
|||
* The class coursecat_sortable_records has been removed.
|
||||
* Admin setting admin_setting_configselect now supports lazy-loading the options list by supplying
|
||||
a callback function instead of an array of options.
|
||||
* Admin setting admin_setting_configselect now supports validating the selection by supplying a
|
||||
callback function.
|
||||
|
||||
=== 3.9 ===
|
||||
* Following function has been deprecated, please use \core\task\manager::run_from_cli().
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue