See Release Notes
Long Term Support Release
Differences Between: [Versions 401 and 402] [Versions 401 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 param: int $id param: null|stdClass $record return: self|null |
create(int $reportid, array $configdata) X-Ref |
Creates a new audience and saves it to database param: int $reportid param: array $configdata return: self |
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 param: array $elements return: string |
validate_config_form(array $data) X-Ref |
Validates the configform of the condition. param: array $data Data from the form return: array Array with errors for each element |
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. param: stdClass $data data obtained from $mform->get_data() return: array $configdata |
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 |