MDL-70795 reportbuilder: custom report filters editor.
Implement module for filters editing, allowing the report editor to define which filters are available when users are viewing the report. These filters allow those users viewing the report to further limit the data being displayed (after conditions have been applied), by selecting their own values for each filter. Co-authored-by: Paul Holden <[email protected]>
This commit is contained in:
committed by
Paul Holden
co-authored by
Paul Holden
parent
ab596ec11a
commit
09b69d04e3
@@ -61,6 +61,7 @@ class users extends datasource {
|
||||
|
||||
$userentityname = $userentity->get_entity_name();
|
||||
$this->add_columns_from_entity($userentityname);
|
||||
$this->add_filters_from_entity($userentityname);
|
||||
$this->add_conditions_from_entity($userentityname);
|
||||
}
|
||||
|
||||
@@ -73,6 +74,15 @@ class users extends datasource {
|
||||
return ['user:fullname', 'user:username', 'user:email'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the filters that will be added to the report once is created
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function get_default_filters(): array {
|
||||
return ['user:fullname', 'user:username', 'user:email'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the conditions that will be added to the report once is created
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user