Subclass of core_role_capability_table_base for use on the Check permissions page.
More...
|
const | NUM_CAPS_FOR_SEARCH = 12 |
| Default number of capabilities in the table for the search UI to be shown.
|
|
|
| $capabilities = array() |
| The capabilities to display. More...
|
|
| $classes = array('rolecap') |
| Added to the class="" attribute on output.
|
|
| $context |
| The context this table relates to.
|
|
| $contextname |
|
| $fullname |
|
| $id |
| Added as an id="" attribute to the table on output.
|
|
| $strno |
|
| $stryes |
|
| $user |
|
Subclass of core_role_capability_table_base for use on the Check permissions page.
We have one additional column, Allowed, which contains yes/no.
◆ __construct()
core_role_check_capability_table::__construct |
( |
|
$context, |
|
|
|
$user, |
|
|
|
$contextname |
|
) |
| |
Constructor.
- Parameters
-
object | $context | the context this table relates to. |
object | $user | the user we are generating the results for. |
string | $contextname | $context->get_context_name() - to save recomputing. |
◆ add_classes()
core_role_capability_table_base::add_classes |
( |
|
$classnames | ) |
|
|
inherited |
Use this to add class="" attributes to the table.
You get the rolecap by default.
- Parameters
-
array | $classnames | of class names. |
◆ add_row_cells()
core_role_check_capability_table::add_row_cells |
( |
|
$capability | ) |
|
|
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.
- Parameters
-
stdClass | $capability | the capability this row relates to. |
- Return values
-
Reimplemented from core_role_capability_table_base.
◆ get_row_attributes()
core_role_capability_table_base::get_row_attributes |
( |
|
$capability | ) |
|
|
protectedinherited |
◆ get_row_classes()
core_role_check_capability_table::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.
- Parameters
-
stdClass | $capability | the capability this row relates to. |
- Return values
-
array | of class name strings. |
Reimplemented from core_role_capability_table_base.
◆ print_heading_row()
core_role_capability_table_base::print_heading_row |
( |
|
$capability | ) |
|
|
protectedinherited |
Used to output a heading rows when the context level or component changes.
- Parameters
-
stdClass | $capability | gives the new component and contextlevel. |
◆ skip_row()
core_role_capability_table_base::skip_row |
( |
|
$capability | ) |
|
|
protectedinherited |
For subclasses to override.
Allows certain capabilties to be left out of the table.
- Parameters
-
object | $capability | the capability this row relates to. |
- Return values
-
boolean. | If true, this row is omitted from the table. |
Reimplemented in core_role_view_role_definition_table.
◆ $capabilities
core_role_capability_table_base::$capabilities = array() |
|
protectedinherited |
The capabilities to display.
Initialised as $context->get_capabilities().
The documentation for this class was generated from the following file: