Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Contains the class used for the displaying the expired contexts table.

Copyright: 2018 Jun Pataleta <jun@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 410 lines (14 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

expired_contexts_table:: (14 methods):
  __construct()
  col_name()
  col_info()
  col_category()
  col_purpose()
  col_retentionperiod()
  col_timecreated()
  col_select()
  col_tobedeleted()
  query_db()
  print_nothing_to_display()
  show_hide_link()
  get_purpose_for_expiry()
  preload_contexts()


Class: expired_contexts_table  - X-Ref

The class for displaying the expired contexts table.

__construct($contextlevel = null)   X-Ref
expired_contexts_table constructor.

param: int|null $contextlevel

col_name($expiredctx)   X-Ref
The context name column.

param: stdClass $expiredctx The row data.
return: string

col_info($expiredctx)   X-Ref
The context information column.

param: stdClass $expiredctx The row data.
return: string

col_category($expiredctx)   X-Ref
The category name column.

param: stdClass $expiredctx The row data.
return: mixed

col_purpose($expiredctx)   X-Ref
The purpose column.

param: stdClass $expiredctx The row data.
return: string

col_retentionperiod($expiredctx)   X-Ref
The retention period column.

param: stdClass $expiredctx The row data.
return: string

col_timecreated($expiredctx)   X-Ref
The timecreated a.k.a. the context expiry date column.

param: stdClass $expiredctx The row data.
return: string

col_select($expiredctx)   X-Ref
Generate the select column.

param: stdClass $expiredctx The row data.
return: string

col_tobedeleted($expiredctx)   X-Ref
Formatting for the 'tobedeleted' column which indicates in a friendlier fashion whose data will be removed.

param: stdClass $expiredctx The row data.
return: string

query_db($pagesize, $useinitialsbar = true)   X-Ref
Query the database for results to display in the table.

param: int $pagesize size of page for paginated displayed table.
param: bool $useinitialsbar do you want to use the initials bar.

print_nothing_to_display()   X-Ref
Override default implementation to display a more meaningful information to the user.


show_hide_link($column, $index)   X-Ref
Override the table's show_hide_link method to prevent the show/hide link for the select column from rendering.

param: string $column the column name, index into various names.
param: int $index numerical index of the column.
return: string HTML fragment.

get_purpose_for_expiry(expired_context $expiredcontext)   X-Ref
Get the purpose for the specified expired context.

param: expired_context $expiredcontext
return: purpose

preload_contexts(array $contextids)   X-Ref
Preload context records given a set of contextids.

param: array   $contextids