This file contains the form add/update a data purpose.
Copyright: | 2018 David Monllao |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 577 lines (19 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
purpose:: (16 methods):
definition()
add_field()
add_override_fields()
filter_data_for_persistent()
get_role_override_id()
get_role_field()
get_lawful_base_field()
get_sensitive_base_field()
get_retention_period_fields()
get_protected_field()
convert_fields()
get_default_data()
convert_existing_data_to_values()
get_role_overrides_from_data()
extra_validation()
set_data()
definition() X-Ref |
Define the form - called by parent constructor |
add_field(\stdClass $data) X-Ref |
Add a fieldset to the current form. param: \stdClass $data |
add_override_fields() X-Ref |
Handle addition of relevant repeated element fields for role overrides. |
filter_data_for_persistent($data) X-Ref |
Converts fields. param: \stdClass $data return: \stdClass |
get_role_override_id(string $prefix = '') X-Ref |
Get the field for the role name. param: string $prefix The prefix to apply to the field return: \stdClass |
get_role_field(string $prefix = '') X-Ref |
Get the field for the role name. param: string $prefix The prefix to apply to the field return: \stdClass |
get_lawful_base_field(string $prefix = '') X-Ref |
Get the mform field for lawful bases. param: string $prefix The prefix to apply to the field return: \stdClass |
get_sensitive_base_field(string $prefix = '') X-Ref |
Get the mform field for sensitive bases. param: string $prefix The prefix to apply to the field return: \stdClass |
get_retention_period_fields(string $prefix = '') X-Ref |
Get the retention period fields. param: string $prefix The name of the main field, and prefix for the subfields. return: \stdClass |
get_protected_field(string $prefix = '') X-Ref |
Get the mform field for the protected flag. param: string $prefix The prefix to apply to the field return: \stdClass |
convert_fields(\stdClass $data) X-Ref |
Converts data to data suitable for storage. param: \stdClass $data return: \stdClass |
get_default_data() X-Ref |
Get the default data. return: \stdClass |
convert_existing_data_to_values(\stdClass $data) X-Ref |
Normalise any values stored in existing data. param: \stdClass $data return: \stdClass |
get_role_overrides_from_data(\stdClass $data) X-Ref |
Fetch the role override data from the list of submitted data. param: \stdClass $data The complete set of processed data return: \stdClass[] The list of overrides |
extra_validation($data, $files, array &$errors) X-Ref |
Define extra validation mechanims. param: stdClass $data Data to validate. param: array $files Array of files. param: array $errors Currently reported errors. return: array of additional errors, or overridden 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 $data |