|
Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
|
Public Member Functions | |
| 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_default_per_page () | |
| Override base implementation, return pagesize as defined in table filterset. | |
| get_row_cells_html (string $rowid, array $row, ?array $suppresslastrow) | |
| Override get_row_cells_html to add an extra cell with the toggle button for card view. | |
| get_sort_columns () | |
| Get user preferred sort columns, overriding those of parent. | |
| 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. | |
| out ($pagesize, $useinitialsbar, $downloadhelpbutton='') | |
| Overriding this method to handle live editing setting. | |
| print_headers () | |
| Override printed headers, to use those of grandparent class. | |
| print_nothing_to_display () | |
| Override print_nothing_to_display to ensure that column headers are always added. | |
| 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_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. | |
| wrap_html_finish () | |
| Provide additional table debugging during editing. | |
Static Public Member Functions | |
| static | create (int $reportid, string $download='') |
| Return a new instance of the class for given report ID. | |
Protected Member Functions | |
| get_active_columns () | |
| Get the columns of the custom report, returned instances being valid and available for the user. | |
| 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. | |
Protected Attributes | |
| bool | $editing = false |
| $editing | |
| string | $groupbysql = '' |
| $groupbysql | |
| report | $persistent |
| $persistent | |
| datasource | $report |
| $report | |
| bool const | REPORT_EDITING = false |
| We're pre/viewing the report, not editing it. | |
|
staticinherited |
Return a new instance of the class for given report ID.
| int | $reportid | |
| string | $download |
| static |
| core_reportbuilder\table\custom_report_table_view::download_buttons | ( | ) |
Get the html for the download buttons.
| string |
Reimplemented from core_reportbuilder\table\custom_report_table.
|
inherited |
Format each row of returned data, executing defined callbacks for the row and each column.
| array | stdClass | $row |
| array |
|
protectedinherited |
Get the columns of the custom report, returned instances being valid and available for the user.
| column[] |
|
inherited |
Get the context for the table (that of the report persistent)
| context |
| core_reportbuilder\table\custom_report_table_view::get_default_per_page | ( | ) |
Override base implementation, return pagesize as defined in table filterset.
| int |
|
inherited |
Override get_row_cells_html to add an extra cell with the toggle button for card view.
| string | $rowid | |
| array | $row | |
| array | null | $suppresslastrow |
| string |
|
inherited |
Get user preferred sort columns, overriding those of parent.
If user has no preferences then use report defaults
| array |
|
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 {
| string |
|
protectedinherited |
Generate suitable SQL for the table.
| bool | $includesort |
| string |
|
inherited |
Return total row count for report table.
Note we'd typically use {
| int |
| core_reportbuilder\table\custom_report_table_view::has_capability | ( | ) |
Check if the user has the capability to access this table.
| bool | Return true if capability check passed. |
Reimplemented from core_reportbuilder\table\custom_report_table.
|
protectedinherited |
Initialises table SQL properties.
| string | $fields | |
| string | $from | |
| array | $joins | |
| string | $where | |
| array | $params | |
| array | $groupby |
|
inherited |
Overriding this method to handle live editing setting.
| int | $pagesize | |
| bool | $useinitialsbar | |
| string | $downloadhelpbutton |
| core_reportbuilder\table\custom_report_table_view::print_headers | ( | ) |
Override printed headers, to use those of grandparent class.
Reimplemented from core_reportbuilder\table\custom_report_table.
|
inherited |
Override print_nothing_to_display to ensure that column headers are always added.
Reimplemented from core_reportbuilder\table\base_report_table.
|
inherited |
Override parent method of the same, to make use of a recordset and avoid issues with duplicate values in the first column.
| int | $pagesize | |
| bool | $useinitialsbar |
|
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
| bool | $editing |