Differences Between: [Versions 400 and 402] [Versions 400 and 403]
(no description)
File Size: | 273 lines (8 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
base:: (13 methods):
__construct()
instance()
create()
get_category()
is_available()
format_description_for_multiselect()
validate_config_form()
get_configdata()
update_configdata()
retrieve_configdata()
get_persistent()
require_user_can_add()
require_user_can_edit()
__construct() X-Ref |
Protected constructor, please use the static instance method. |
instance(int $id = 0, ?stdClass $record = null) X-Ref |
Loads an existing instance of audience with persistent return: self|null param: int $id param: null|stdClass $record |
create(int $reportid, array $configdata) X-Ref |
Creates a new audience and saves it to database return: self param: int $reportid param: array $configdata |
get_category() X-Ref |
Returns string for audience category. return: string |
is_available() X-Ref |
If the current user is able to use this audience type This method needs to return true if audience type is available to user for reasons other than permission check, which is done in {@see user_can_add}. (e.g. user can add cohort audience type only if there is at least one cohort they can access). return: bool |
format_description_for_multiselect(array $elements) X-Ref |
Helper to format descriptions for audience types that may contain many selected elements, limiting number show according to {@see MULTI_SELECT_LIMIT} constant value return: string param: array $elements |
validate_config_form(array $data) X-Ref |
Validates the configform of the condition. return: array Array with errors for each element param: array $data Data from the form |
get_configdata() X-Ref |
Returns configdata as an associative array return: array decoded configdata |
update_configdata(array $configdata) X-Ref |
Update configdata in audience persistent param: array $configdata |
retrieve_configdata(stdClass $data) X-Ref |
Returns $configdata from form data suitable for use in DB record. return: array $configdata param: stdClass $data data obtained from $mform->get_data() |
get_persistent() X-Ref |
Return audience persistent. return: audience |
require_user_can_add() X-Ref |
Require current user is able to add this audience type |
require_user_can_edit() X-Ref |
Require current user is able to edit this audience type |