(no description)
File Size: | 222 lines (6 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
condition:: (16 methods):
__construct()
allow_custom()
allow_multiple()
get_initial_values()
get_filteroptions()
allow_empty()
is_required()
get_condition_class()
get_condition_key()
where()
params()
display_options_adv()
display_options()
get_join_list()
get_filter_from_list()
build_query_from_filter()
__construct(view $qbank = null) X-Ref |
Extract the required filter from the provided question bank view. This will look for the filter matching {@see get_condition_key()} param: view|null $qbank |
allow_custom() X-Ref |
Whether customisation is allowed. return: bool |
allow_multiple() X-Ref |
Whether multiple values are allowed . return: bool |
get_initial_values() X-Ref |
Initial values of the condition return: array |
get_filteroptions() X-Ref |
Extra data specific to this condition. return: \stdClass |
allow_empty() X-Ref |
Whether empty value is allowed return: bool |
is_required() X-Ref |
Whether this filter is required - if so it cannot be removed from the list of filters. return: bool |
get_condition_class() X-Ref |
Return this condition class return: string |
get_condition_key() X-Ref |
Each condition will need a unique key to be identified and sequenced by the api. Use a unique string for the condition identifier, use string directly, dont need to use language pack. Using language pack might break the filter object for multilingual support. return: string |
where() X-Ref |
Return an SQL fragment to be ANDed into the WHERE clause to filter which questions are shown. return: string SQL fragment. Must use named parameters. |
params() X-Ref |
Return parameters to be bound to the above WHERE clause fragment. return: array parameter name => value. |
display_options_adv() X-Ref |
Display GUI for selecting criteria for this condition. Displayed when Show More is open. Compare display_options(), which displays always, whether Show More is open or not. return: bool|string HTML form fragment |
display_options() X-Ref |
Display GUI for selecting criteria for this condition. Displayed always, whether Show More is open or not. Compare display_options_adv(), which displays when Show More is open. return: bool|string HTML form fragment |
get_join_list() X-Ref |
Get the list of available joins for the filter. return: array |
get_filter_from_list(array $filters) X-Ref |
Given an array of filters, pick the entry that matches the condition key and return it. param: array $filters Array of filters, keyed by condition. return: ?array The filter that matches this condition |
build_query_from_filter(array $filter) X-Ref |
Build query from filter value param: array $filter filter properties return: array where sql and params |