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

Defines 1 class


Class: datasource  - X-Ref

Class datasource

add_columns_from_entity(string $entityname, array $include = [], array $exclude = [])   X-Ref
Add columns from the given entity name to be available to use in a custom report

param: string $entityname
param: array $include Include only these columns, if omitted then include all
param: array $exclude Exclude these columns, if omitted then exclude none

add_default_columns()   X-Ref
Add default datasource columns to the report

This method is optional and can be called when the report is created to add the default columns defined in the
selected datasource.

get_active_columns()   X-Ref
Return all configured report columns

return: column[]

add_filters_from_entity(string $entityname, array $include = [], array $exclude = [])   X-Ref
Add filters from the given entity name to be available to use in a custom report

param: string $entityname
param: array $include Include only these filters, if omitted then include all
param: array $exclude Exclude these filters, if omitted then exclude none

add_default_filters()   X-Ref
Add default datasource filters to the report

This method is optional and can be called when the report is created to add the default filters defined in the
selected datasource.

get_active_filters()   X-Ref
Return all configured report filters

return: filter[]

add_conditions_from_entity(string $entityname, array $include = [], array $exclude = [])   X-Ref
Add conditions from the given entity name to be available to use in a custom report

param: string $entityname
param: array $include Include only these conditions, if omitted then include all
param: array $exclude Exclude these conditions, if omitted then exclude none

add_default_conditions()   X-Ref
Add default datasource conditions to the report

This method is optional and can be called when the report is created to add the default conditions defined in the
selected datasource.

get_active_conditions()   X-Ref
Return all configured report conditions

return: filter[]