Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 401] [Versions 400 and 402] [Versions 400 and 403]

(no description)

File Size: 170 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: filter  - X-Ref

Persistent class to represent a report filter/condition

define_properties()   X-Ref
Return the definition of the properties of this model.

return: array

validate_reportid(int $reportid)   X-Ref
Validate reportid property

return: bool|lang_string
param: int $reportid

get_report()   X-Ref
Return the report this filter belongs to

return: report

get_filter_record(int $reportid, int $filterid)   X-Ref
Return filter record

return: false|static
param: int $reportid
param: int $filterid

get_filter_records(int $reportid, string $sort = '', string $order = 'ASC')   X-Ref
Return filter records for report

return: static[]
param: int $reportid
param: string $sort
param: string $order

get_condition_record(int $reportid, int $conditionid)   X-Ref
Return condition record

return: false|static
param: int $reportid
param: int $conditionid

get_condition_records(int $reportid, string $sort = '', string $order = 'ASC')   X-Ref
Return condition records for report

return: static[]
param: int $reportid
param: string $sort
param: string $order

get_max_filterorder(int $reportid, bool $iscondition = false)   X-Ref
Helper method to return the current maximum filter order value for a report

return: int
param: int $reportid
param: bool $iscondition

get_formatted_heading(?context $context = null)   X-Ref
Return formatted filter heading

return: string
param: context|null $context If the context of the report is already known, it should be passed here