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

Static Public Member Functions

static compatible (int $columntype)
 This aggregation can be performed on all column types.
 
static format_value ($value, array $values, array $callbacks, int $columntype)
 Return formatted value for column when applying aggregation.
 
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\count::compatible ( int $columntype)
static

This aggregation can be performed on all column types.

Parameters
int$columntype
Return values
bool

Reimplemented from core_reportbuilder\local\aggregation\base.

◆ format_value()

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

Return formatted value for column when applying aggregation.

Parameters
mixed$value
array$values
array$callbacks
int$columntype
Return values
int

Reimplemented from core_reportbuilder\local\aggregation\base.

◆ 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\count::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\count::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: