Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 400 and 401]

(no description)

File Size: 171 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

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

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

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

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

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

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

param: string $source
return: bool

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

param: stdClass $reportdata
return: report

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

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

report_limit_reached()   X-Ref
Configured site limit for number of custom reports threshold has been reached

return: bool