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

Defines 1 class


Class: base  - X-Ref

Base class for all report entities

get_default_entity_name()   X-Ref
The default machine-readable name for this entity that will be used in the internal names of the columns/filters

return: string

set_entity_name(string $entityname)   X-Ref
Set entity name

return: self
param: string $entityname

get_entity_name()   X-Ref
Return entity name

return: string

set_entity_title(lang_string $title)   X-Ref
Set entity title

return: self
param: lang_string $title

get_entity_title()   X-Ref
Get entity title

return: lang_string

set_table_alias(string $tablename, string $alias)   X-Ref
Override the default alias for given database table used in entity queries

return: self
param: string $tablename
param: string $alias

get_table_alias(string $tablename)   X-Ref
Returns an alias used in the queries for a given table

return: string
param: string $tablename

add_join(string $join)   X-Ref
Add join clause required for this entity to join to existing tables/entities

return: self
param: string $join

add_joins(array $joins)   X-Ref
Add multiple join clauses required for this entity {@see add_join}

return: self
param: string[] $joins

get_joins()   X-Ref
Return entity joins

return: string[]

add_column(column $column)   X-Ref
Add a column to the entity

return: self
param: column $column

get_columns()   X-Ref
Returns entity columns

return: column[]

get_column(string $name)   X-Ref
Returns an entity column

return: column
param: string $name

add_filter(filter $filter)   X-Ref
Add a filter to the entity

return: self
param: filter $filter

get_filters()   X-Ref
Returns entity filters

return: filter[]

get_filter(string $name)   X-Ref
Returns an entity filter

return: filter
param: string $name

add_condition(filter $condition)   X-Ref
Add a condition to the entity

return: $this
param: filter $condition

get_conditions()   X-Ref
Returns entity conditions

return: filter[]

get_condition(string $name)   X-Ref
Returns an entity condition

return: filter
param: string $name