Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
core_comment\reportbuilder\local\entities\comment Class Reference
Inheritance diagram for core_comment\reportbuilder\local\entities\comment:
core_reportbuilder\local\aggregation\base

Public Member Functions

 get_context_join ()
 Return syntax for joining on the context table.
 
 initialise ()
 Initialise the entity.
 

Static Public Member Functions

static compatible (int $columntype)
 Whether the aggregation is compatible with the given column type.
 
static format_value ($value, array $values, array $callbacks, int $columntype)
 Return formatted value for column when applying aggregation, by default executing all callbacks on the value.
 
static get_class_name ()
 Return the class name of the aggregation type.
 
static get_column_field_sql (array $sqlfields)
 Return SQL suitable for using within {.
 
static get_field_sql (string $field, int $columntype)
 Return the aggregated field SQL.
 
static get_name ()
 Return the display name of the aggregation.
 
static sortable (bool $columnsortable)
 Whether the aggregation is sortable, by default return the sortable status of the column itself.
 

Protected Member Functions

 get_all_columns ()
 Returns list of all available columns.
 
 get_all_filters ()
 Return list of all available filters.
 
 get_default_entity_title ()
 The default title for this entity.
 
 get_default_table_aliases ()
 Database tables that this entity uses and their default aliases.
 

Static Protected Member Functions

static get_column_fields_concat (array $sqlfields, string $delimeter=',', string $coalescechar=' ')
 Helper method for concatenating given fields for a column, so they are suitable for aggregation.
 

Member Function Documentation

◆ compatible()

static core_reportbuilder\local\aggregation\base::compatible ( int $columntype)
staticabstractinherited

◆ format_value()

static core_reportbuilder\local\aggregation\base::format_value ( $value,
array $values,
array $callbacks,
int $columntype )
staticinherited

Return formatted value for column when applying aggregation, by default executing all callbacks on the value.

Should be overridden in child classes that need to format the column value differently (e.g. 'sum' would just show a numeric count value)

Parameters
mixed$value
array$values
array$callbacksArray of column callbacks, {
See also
column\add_callback} for definition
Parameters
int$columntypeThe original type of the column, to ensure it is preserved for callbacks
Return values
mixed

Reimplemented in core_reportbuilder\local\aggregation\avg, core_reportbuilder\local\aggregation\count, core_reportbuilder\local\aggregation\countdistinct, core_reportbuilder\local\aggregation\groupconcat, core_reportbuilder\local\aggregation\percent, and core_reportbuilder\local\aggregation\sum.

◆ get_all_columns()

core_comment\reportbuilder\local\entities\comment::get_all_columns ( )
protected

Returns list of all available columns.

Return values
column[]

◆ get_all_filters()

core_comment\reportbuilder\local\entities\comment::get_all_filters ( )
protected

Return list of all available filters.

Return values
filter[]

◆ get_class_name()

static core_reportbuilder\local\aggregation\base::get_class_name ( )
staticfinalinherited

Return the class name of the aggregation type.

Return values
string

◆ get_column_field_sql()

static core_reportbuilder\local\aggregation\base::get_column_field_sql ( array $sqlfields)
staticinherited

Return SQL suitable for using within {.

See also
get_field_sql} for column fields, by default just the first one
Parameters
string[]$sqlfields
Return values
string

Reimplemented in core_reportbuilder\local\aggregation\countdistinct, and core_reportbuilder\local\aggregation\groupconcat.

◆ get_column_fields_concat()

static core_reportbuilder\local\aggregation\base::get_column_fields_concat ( array $sqlfields,
string $delimeter = ',',
string $coalescechar = ' ' )
staticfinalprotectedinherited

Helper method for concatenating given fields for a column, so they are suitable for aggregation.

Parameters
string[]$sqlfields
string$delimeter
string$coalescechar
Return values
string

◆ get_context_join()

core_comment\reportbuilder\local\entities\comment::get_context_join ( )

Return syntax for joining on the context table.

Return values
string

◆ get_default_entity_title()

core_comment\reportbuilder\local\entities\comment::get_default_entity_title ( )
protected

The default title for this entity.

Return values
lang_string

◆ get_default_table_aliases()

core_comment\reportbuilder\local\entities\comment::get_default_table_aliases ( )
protected

Database tables that this entity uses and their default aliases.

Return values
array

◆ get_field_sql()

◆ get_name()

◆ initialise()

core_comment\reportbuilder\local\entities\comment::initialise ( )

Initialise the entity.

Return values
base

◆ sortable()

static core_reportbuilder\local\aggregation\base::sortable ( bool $columnsortable)
staticinherited

Whether the aggregation is sortable, by default return the sortable status of the column itself.

Parameters
bool$columnsortable
Return values
bool

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