Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core_reportbuilder\manager Class Reference

Static Public Member Functions

static create_report_persistent (stdClass $reportdata)
 Create new report persistent.
 
static get_report_datasources ()
 Return an array of all valid report sources across the site.
 
static get_report_from_id (int $reportid, array $parameters=[])
 Return an instance of a report class from the given report ID.
 
static get_report_from_persistent (report $report, array $parameters=[])
 Return an instance of a report class from the given report persistent.
 
static report_limit_reached ()
 Configured site limit for number of custom reports threshold has been reached.
 
static report_source_available (string $source)
 Verify given report source is available.
 
static report_source_exists (string $source, string $additionalbaseclass='')
 Verify that report source exists and extends appropriate base classes.
 
static reset_caches ()
 Run reset code after tests to reset the instance cache.
 

Member Function Documentation

◆ create_report_persistent()

static core_reportbuilder\manager::create_report_persistent ( stdClass $reportdata)
static

Create new report persistent.

Parameters
stdClass$reportdata
Return values
report

◆ get_report_datasources()

static core_reportbuilder\manager::get_report_datasources ( )
static

Return an array of all valid report sources across the site.

Return values
array[][]Indexed by [component => [class => name]]

◆ get_report_from_id()

static core_reportbuilder\manager::get_report_from_id ( int $reportid,
array $parameters = [] )
static

Return an instance of a report class from the given report ID.

Parameters
int$reportid
array$parameters
Return values
base

◆ get_report_from_persistent()

static core_reportbuilder\manager::get_report_from_persistent ( report $report,
array $parameters = [] )
static

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

Parameters
report$report
array$parameters
Return values
base
Exceptions
source_invalid_exception
source_unavailable_exception

◆ report_limit_reached()

static core_reportbuilder\manager::report_limit_reached ( )
static

Configured site limit for number of custom reports threshold has been reached.

Return values
bool

◆ report_source_available()

static core_reportbuilder\manager::report_source_available ( string $source)
static

Verify given report source is available.

Note that it is assumed caller has already checked that it exists

Parameters
string$source
Return values
bool

◆ report_source_exists()

static core_reportbuilder\manager::report_source_exists ( string $source,
string $additionalbaseclass = '' )
static

Verify that report source exists and extends appropriate base classes.

Parameters
string$sourceFull namespaced path to report definition
string$additionalbaseclassSpecify addition base class that given classname should extend
Return values
bool

The documentation for this class was generated from the following file: