Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
|
Public Member Functions | |
add_join (string $join) | |
Add join clause required for this entity to join to existing tables/entities. | |
add_joins (array $joins) | |
Add multiple join clauses required for this entity {. | |
format ($value, stdClass $row, string $fieldname) | |
Formats the course field for display. | |
get_column (string $name) | |
Returns an entity column. | |
get_columns () | |
Returns entity columns. | |
get_condition (string $name) | |
Returns an entity condition. | |
get_conditions () | |
Returns entity conditions. | |
get_context_join () | |
Return syntax for joining on the context table. | |
get_entity_name () | |
Return entity name. | |
get_entity_title () | |
Get entity title. | |
get_filter (string $name) | |
Returns an entity filter. | |
get_filters () | |
Returns entity filters. | |
get_joins () | |
Return entity joins. | |
get_table_alias (string $tablename) | |
Returns an alias used in the queries for a given table. | |
get_table_aliases () | |
Returns aliases used in the queries for all tables. | |
get_tag_joins () | |
Return joins necessary for retrieving tags. | |
has_table_join_alias (string $tablename) | |
Determine whether defined table join alias was specified. | |
initialise () | |
Initialise the entity, adding all course and custom course fields. | |
set_entity_name (string $entityname) | |
Set entity name. | |
set_entity_title (lang_string $title) | |
Set entity title. | |
set_table_alias (string $tablename, string $alias) | |
Override the default alias for given database table used in entity queries, for instance when the same table is used by multiple entities and you want them each to refer to it by the same alias. | |
set_table_aliases (array $aliases) | |
Override multiple default database table aliases used in entity queries as per {. | |
set_table_join_alias (string $tablename, string $alias) | |
Set the alias for given database table that has already been added to the report. | |
Static Public Member Functions | |
static | get_options_for_calendartype () |
List of options for the field. | |
static | get_options_for_format () |
List of options for the field format. | |
static | get_options_for_groupmode () |
List of options for the field groupmode. | |
static | get_options_for_lang () |
List of options for the field lang. | |
static | get_options_for_theme () |
List of options for the field theme. | |
Protected Member Functions | |
add_column (column $column) | |
Add a column to the entity. | |
add_condition (filter $condition) | |
Add a condition to the entity. | |
add_filter (filter $filter) | |
Add a filter to the entity. | |
get_all_columns () | |
Returns list of all available columns. | |
get_all_filters () | |
Returns list of all available filters. | |
get_course_field_type (string $coursefield) | |
Return appropriate column type for given user field. | |
get_course_fields () | |
Course fields. | |
get_custom_fields () | |
Get custom fields helper. | |
get_default_entity_title () | |
The default title for this entity in the list of columns/filters in the report builder. | |
get_default_table_aliases () | |
Database tables that this entity uses and their default aliases (note that these aliases are now ignored) | |
get_default_tables () | |
Database tables that this entity uses. | |
get_options_for (string $fieldname) | |
Gets list of options if the filter supports it. | |
get_tag_joins_for_entity (string $component, string $itemtype, string $itemidfield) | |
Helper method for returning joins necessary for retrieving tags related to the current entity. | |
is_sortable (string $fieldname) | |
Check if this field is sortable. | |
|
finalprotectedinherited |
Add a column to the entity.
column | $column |
self |
|
finalprotectedinherited |
Add a condition to the entity.
filter | $condition |
$this |
|
finalprotectedinherited |
Add a filter to the entity.
filter | $filter |
self |
|
finalinherited |
Add join clause required for this entity to join to existing tables/entities.
string | $join |
self |
|
finalinherited |
Add multiple join clauses required for this entity {.
string[] | $joins |
self |
core_reportbuilder\local\entities\course::format | ( | $value, | |
stdClass | $row, | ||
string | $fieldname ) |
Formats the course field for display.
mixed | $value | Current field value. |
stdClass | $row | Complete row. |
string | $fieldname | Name of the field to format. |
string |
|
protected |
Returns list of all available columns.
These are all the columns available to use in any report that uses this entity.
column[] |
|
protected |
Returns list of all available filters.
array |
|
finalinherited |
Returns an entity column.
string | $name |
column |
coding_exception | For invalid column name |
|
finalinherited |
Returns entity columns.
column[] |
|
finalinherited |
Returns an entity condition.
string | $name |
filter |
coding_exception | For invalid condition name |
|
finalinherited |
Returns entity conditions.
filter[] |
core_reportbuilder\local\entities\course::get_context_join | ( | ) |
Return syntax for joining on the context table.
string |
|
protected |
Return appropriate column type for given user field.
string | $coursefield |
int |
|
protected |
Course fields.
array |
|
protected |
Get custom fields helper.
custom_fields |
|
protected |
The default title for this entity in the list of columns/filters in the report builder.
lang_string |
Reimplemented from core_reportbuilder\local\entities\base.
|
protectedinherited |
Database tables that this entity uses and their default aliases (note that these aliases are now ignored)
string[] | Array of $tablename => $alias |
|
protected |
Database tables that this entity uses.
string[] |
Reimplemented from core_reportbuilder\local\entities\base.
|
finalinherited |
Return entity name.
string |
|
finalinherited |
Get entity title.
lang_string |
|
finalinherited |
Returns an entity filter.
string | $name |
filter |
coding_exception | For invalid filter name |
|
finalinherited |
Returns entity filters.
filter[] |
|
finalinherited |
Return entity joins.
string[] |
|
protected |
Gets list of options if the filter supports it.
string | $fieldname |
null|array |
|
static |
List of options for the field.
array |
|
static |
List of options for the field format.
array |
|
static |
List of options for the field groupmode.
array |
|
static |
List of options for the field lang.
array |
|
static |
List of options for the field theme.
array |
|
finalinherited |
Returns an alias used in the queries for a given table.
string | $tablename | One of the tables set by { |
string |
coding_exception | For invalid table name |
|
finalinherited |
Returns aliases used in the queries for all tables.
string[] |
core_reportbuilder\local\entities\course::get_tag_joins | ( | ) |
Return joins necessary for retrieving tags.
string[] |
|
finalprotectedinherited |
Helper method for returning joins necessary for retrieving tags related to the current entity.
Both 'tag' and 'tag_instance' aliases must be returned by the entity {
string | $component | |
string | $itemtype | |
string | $itemidfield |
string[] |
|
finalinherited |
Determine whether defined table join alias was specified.
Call {
string | $tablename |
bool |
core_reportbuilder\local\entities\course::initialise | ( | ) |
Initialise the entity, adding all course and custom course fields.
base |
Reimplemented from core_reportbuilder\local\entities\base.
|
protected |
Check if this field is sortable.
string | $fieldname |
bool |
|
finalinherited |
Set entity name.
string | $entityname |
self |
|
finalinherited |
|
finalinherited |
Override the default alias for given database table used in entity queries, for instance when the same table is used by multiple entities and you want them each to refer to it by the same alias.
string | $tablename | One of the tables set by { |
string | $alias |
self |
coding_exception | For invalid table name |
|
finalinherited |
Override multiple default database table aliases used in entity queries as per {.
array | $aliases | Array of tablename => alias values |
self |
|
finalinherited |
Set the alias for given database table that has already been added to the report.
Enables entities to avoid additional joins on the same table by allowing re-use of existing table aliases in their own queries, {
string | $tablename | |
string | $alias |
self |