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: 159 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: manager  - X-Ref

Report management class

get_report_from_persistent(report $report, array $parameters = [])   X-Ref
Return an instance of a report class from the given report persistent

We statically cache the list of loaded reports per user during request lifecycle, to allow this method to be called
repeatedly without potential performance problems initialising the same report multiple times

return: base
param: report $report
param: array $parameters

reset_caches()   X-Ref
Run reset code after tests to reset the instance cache


get_report_from_id(int $reportid, array $parameters = [])   X-Ref
Return an instance of a report class from the given report ID

return: base
param: int $reportid
param: array $parameters

report_source_exists(string $source, string $additionalbaseclass = '')   X-Ref
Verify that report source exists and extends appropriate base classes

return: bool
param: string $source Full namespaced path to report definition
param: string $additionalbaseclass Specify addition base class that given classname should extend

report_source_available(string $source)   X-Ref
Verify given report source is available. Note that it is assumed caller has already checked that it exists

return: bool
param: string $source

create_report_persistent(stdClass $reportdata)   X-Ref
Create new report persistent

return: report
param: stdClass $reportdata

get_report_datasources()   X-Ref
Return an array of all valid report sources across the site

return: array[][] Indexed by [component => [class => name]]