|
Moodle
2.2.1
http://www.collinsharper.com
|

Public Member Functions | |
| __construct ($context, $id) | |
| add_classes ($classnames) | |
| display () | |
Data Fields | |
| const | NUM_CAPS_FOR_SEARCH = 12 |
Protected Member Functions | |
| print_heading_row ($capability) | |
| add_header_cells () | |
| num_extra_columns () | |
| skip_row ($capability) | |
| get_row_classes ($capability) | |
| add_row_cells ($capability) | |
Protected Attributes | |
| $context | |
| $capabilities = array() | |
| $id | |
| $classes = array('rolecap') | |
This class represents a table with one row for each of a list of capabilities where the first cell in the row contains the capability name, and there is arbitrary stuff in the rest of the row. This class is used by admin/roles/manage.php, override.php and check.php.
An ajaxy search UI shown at the top, if JavaScript is on.
| __construct | ( | $ | context, |
| $ | id | ||
| ) |
Constructor
| object | $context | the context this table relates to. |
| string | $id | what to put in the id="" attribute. |
Reimplemented in view_role_definition_table, define_role_table_basic, and define_role_table_advanced.
Definition at line 67 of file lib.php.

| add_classes | ( | $ | classnames | ) |
| add_header_cells | ( | ) | [abstract, protected] |
For subclasses to override, output header cells, after the initial capability one.
Reimplemented in capability_table_with_risks, permissions_table, and check_capability_table.

| add_row_cells | ( | $ | capability | ) | [abstract, protected] |
For subclasses to override. Output the data cells for this capability. The capability name cell will already have been output.
You can rely on get_row_classes always being called before add_row_cells.
| object | $capability | the capability this row relates to. |
Reimplemented in capability_table_with_risks, permissions_table, and check_capability_table.

| display | ( | ) |
Display the table.
Loop over capabilities.
Prints a breaker if component or name or context level has changed
Start the row.
Table cell for the capability name.
Add the cells specific to this table.
End the row.
End of the table.
Reimplemented in define_role_table_advanced, and capability_table_with_risks.
Definition at line 85 of file lib.php.

| get_row_classes | ( | $ | capability | ) | [protected] |
For subclasses to override. A change to reaturn class names that are added to the class="" attribute on the <tr> for this capability.
| object | $capability | the capability this row relates to. |
Reimplemented in capability_table_with_risks, and check_capability_table.
Definition at line 165 of file lib.php.

| num_extra_columns | ( | ) | [abstract, protected] |
For subclasses to override, return the number of cells that add_header_cells/add_row_cells output.
Reimplemented in capability_table_with_risks, permissions_table, and check_capability_table.

| print_heading_row | ( | $ | capability | ) | [protected] |
| skip_row | ( | $ | capability | ) | [protected] |
$capabilities = array() [protected] |
$classes = array('rolecap') [protected] |
$id [protected] |
| const NUM_CAPS_FOR_SEARCH = 12 |