Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core_reportbuilder\local\aggregation\max Class Reference
Inheritance diagram for core_reportbuilder\local\aggregation\max:
core_reportbuilder\local\aggregation\base

Static Public Member Functions

static compatible (int $columntype)
 This aggregation can be performed on all numeric/date/boolean types.
 
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 aggregation name.
 
static sortable (bool $columnsortable)
 Whether the aggregation is sortable, by default return the sortable status of the column itself.
 

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\max::compatible ( int $columntype)
static

This aggregation can be performed on all numeric/date/boolean types.

Parameters
int$columntype
Return values
bool

Reimplemented from core_reportbuilder\local\aggregation\base.

◆ 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_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_field_sql()

static core_reportbuilder\local\aggregation\max::get_field_sql ( string $field,
int $columntype )
static

Return the aggregated field SQL.

Parameters
string$field
int$columntype
Return values
string

Reimplemented from core_reportbuilder\local\aggregation\base.

◆ get_name()

static core_reportbuilder\local\aggregation\max::get_name ( )
static

Return aggregation name.

Return values
lang_string

Reimplemented from core_reportbuilder\local\aggregation\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: