Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403]
Form for editing steps.
Copyright: | 2016 Andrew Nicols <andrew@nicols.co.uk> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 223 lines (9 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
editstep:: (5 methods):
__construct()
definition()
validation()
set_data()
get_data()
__construct($target, \tool_usertours\step $step) X-Ref |
Create the edit step form. param: string $target The target of the form. param: step $step The step being editted. |
definition() X-Ref |
Form definition. |
validation($data, $files) X-Ref |
Validate the database on the submitted content type. param: array $data array of ("fieldname"=>value) of submitted data param: array $files array of uploaded files "element_name"=>tmp_file_path return: array of "element_name"=>"error_description" if there are errors, |
set_data($data) X-Ref |
Load in existing data as form defaults. Usually new entry defaults are stored directly in form definition (new entry form); this function is used to load in data where values already exist and data is being edited (edit entry form). param: stdClass|array $data object or array of default values |
get_data() X-Ref |
Return submitted data if properly submitted or returns NULL if validation fails or if there is no submitted data. return: object|null submitted data; NULL if not valid or not submitted or cancelled |