MDL-81065 core_filters: New WS core_filters_get_all_states
This commit is contained in:
@@ -1316,6 +1316,16 @@ function filter_get_global_states() {
|
||||
return $DB->get_records('filter_active', array('contextid' => $context->id), 'sortorder', 'filter,active,sortorder');
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve all the filters and their states (including overridden ones in any context).
|
||||
*
|
||||
* @return array filters objects containing filter name, context, active state and sort order.
|
||||
*/
|
||||
function filter_get_all_states(): array {
|
||||
global $DB;
|
||||
return $DB->get_records('filter_active');
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete all the data in the database relating to a filter, prior to deleting it.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user