|
| | __construct (string $uniqueid, array $parameters=[]) |
| | Table constructor.
|
| |
| | download_buttons () |
| | Get the html for the download buttons.
|
| |
| | format_row ($row) |
| | Format each row of returned data, executing defined callbacks for the row and each column.
|
| |
| | get_context () |
| | Get the context for the table (that of the report persistent)
|
| |
| | get_row_class ($row) |
| | Override parent method for retrieving row class with that defined by the system report.
|
| |
| | get_sql_sort () |
| | Override parent method of the same, to ensure that any columns with custom sort fields are accounted for.
|
| |
| | get_total_row_count () |
| | Return total row count for report table.
|
| |
|
| guess_base_url () |
| | Set the base URL of the table to the current page URL.
|
| |
| | has_capability () |
| | Check if the user has the capability to access this table.
|
| |
| | print_nothing_to_display () |
| | Override print_nothing_to_display to modity the output styles.
|
| |
| | query_db ($pagesize, $useinitialsbar=true) |
| | Override parent method of the same, to make use of a recordset and avoid issues with duplicate values in the first column.
|
| |
| | set_filterset (filterset $filterset) |
| | Set the filterset in the table class.
|
| |
| | set_report_editing (bool $editing) |
| | Whether the current report table is being edited, in which case certain actions are not applied to it, e.g.
|
| |
|
| start_html () |
| | Override start of HTML to remove top pagination.
|
| |
|
| static | create (int $reportid, array $parameters) |
| | Return a new instance of the class for given report ID.
|
| |
|
| | get_table_sql (bool $includesort=true) |
| | Generate suitable SQL for the table.
|
| |
| | init_sql (string $fields, string $from, array $joins, string $where, array $params, array $groupby=[]) |
| | Initialises table SQL properties.
|
| |
|
|
bool | $editing = false |
| | $editing
|
| |
|
string | $groupbysql = '' |
| | $groupbysql
|
| |
|
report | $persistent |
| | $persistent
|
| |
|
system_report | $report |
| | $report
|
| |
◆ __construct()
| core_reportbuilder\table\system_report_table::__construct |
( |
string | $uniqueid, |
|
|
array | $parameters = [] ) |
Table constructor.
Note that the passed unique ID value must match the pattern "system-report-table-(::d+)" so that dynamic updates continue to load the same report
- Parameters
-
| string | $uniqueid | |
| array | $parameters | |
- Exceptions
-
| moodle_exception | For invalid unique ID |
◆ create()
| static core_reportbuilder\table\system_report_table::create |
( |
int | $reportid, |
|
|
array | $parameters ) |
|
static |
Return a new instance of the class for given report ID.
We include report parameters here so they are present during initialisation
- Parameters
-
| int | $reportid | |
| array | $parameters | |
- Return values
-
◆ download_buttons()
| core_reportbuilder\table\system_report_table::download_buttons |
( |
| ) |
|
Get the html for the download buttons.
- Return values
-
◆ format_row()
| core_reportbuilder\table\system_report_table::format_row |
( |
| $row | ) |
|
Format each row of returned data, executing defined callbacks for the row and each column.
- Parameters
-
- Return values
-
◆ get_context()
| core_reportbuilder\table\base_report_table::get_context |
( |
| ) |
|
|
inherited |
Get the context for the table (that of the report persistent)
- Return values
-
◆ get_row_class()
| core_reportbuilder\table\system_report_table::get_row_class |
( |
| $row | ) |
|
Override parent method for retrieving row class with that defined by the system report.
- Parameters
-
- Return values
-
◆ get_sql_sort()
| core_reportbuilder\table\base_report_table::get_sql_sort |
( |
| ) |
|
|
inherited |
Override parent method of the same, to ensure that any columns with custom sort fields are accounted for.
Because the base table_sql has "special" handling of fullname columns {
- See also
- table_sql::contains_fullname_columns}, we need to handle that here to ensure that any that are being sorted take priority over reportbuilders own aliases of the same columns. This prevents them appearing multiple times in a query, which SQL Server really doesn't like
- Return values
-
◆ get_table_sql()
| core_reportbuilder\table\base_report_table::get_table_sql |
( |
bool | $includesort = true | ) |
|
|
protectedinherited |
Generate suitable SQL for the table.
- Parameters
-
- Return values
-
◆ get_total_row_count()
| core_reportbuilder\table\base_report_table::get_total_row_count |
( |
| ) |
|
|
inherited |
Return total row count for report table.
Note we'd typically use {
- See also
- query_db} and then read the {
-
totalrows} property to reduce DB calls, however we can use this method when we specifically don't also need to obtain all data
- Return values
-
◆ has_capability()
| core_reportbuilder\table\system_report_table::has_capability |
( |
| ) |
|
Check if the user has the capability to access this table.
- Return values
-
| bool | Return true if capability check passed. |
Implements core_table\dynamic.
◆ init_sql()
| core_reportbuilder\table\base_report_table::init_sql |
( |
string | $fields, |
|
|
string | $from, |
|
|
array | $joins, |
|
|
string | $where, |
|
|
array | $params, |
|
|
array | $groupby = [] ) |
|
protectedinherited |
Initialises table SQL properties.
- Parameters
-
| string | $fields | |
| string | $from | |
| array | $joins | |
| string | $where | |
| array | $params | |
| array | $groupby | |
◆ print_nothing_to_display()
| core_reportbuilder\table\base_report_table::print_nothing_to_display |
( |
| ) |
|
|
inherited |
◆ query_db()
| core_reportbuilder\table\base_report_table::query_db |
( |
| $pagesize, |
|
|
| $useinitialsbar = true ) |
|
inherited |
Override parent method of the same, to make use of a recordset and avoid issues with duplicate values in the first column.
- Parameters
-
| int | $pagesize | |
| bool | $useinitialsbar | |
◆ set_filterset()
| core_reportbuilder\table\system_report_table::set_filterset |
( |
filterset | $filterset | ) |
|
Set the filterset in the table class.
We set the report parameters here so that they are persisted while paging
- Parameters
-
◆ set_report_editing()
| core_reportbuilder\table\base_report_table::set_report_editing |
( |
bool | $editing | ) |
|
|
inherited |
Whether the current report table is being edited, in which case certain actions are not applied to it, e.g.
user filtering and sorting. Default class value is false
- Parameters
-
The documentation for this class was generated from the following file:
- reportbuilder/classes/table/system_report_table.php