|
const | NUM_CAPS_FOR_SEARCH = 12 |
| Default number of capabilities in the table for the search UI to be shown.
|
|
|
| $allpermissions |
|
| $allrisks |
|
| $capabilities = array() |
| The capabilities to display. More...
|
|
| $changed |
|
| $classes = array('rolecap table-hover') |
| Added to the class="" attribute on output.
|
|
| $context |
| The context this table relates to.
|
|
| $displaypermissions |
|
| $haslockedcapabilities = false |
|
| $id |
| Added as an id="" attribute to the table on output.
|
|
array | $parentpermissions |
| The capabilities to highlight as default/inherited.
|
|
| $permissions |
|
| $risksurl |
|
| $roleid |
|
| $strnotset |
|
| $strperms |
|
◆ __construct()
core_role_override_permissions_table_advanced::__construct |
( |
|
$context, |
|
|
|
$roleid, |
|
|
|
$safeoverridesonly |
|
) |
| |
Constructor.
This method loads loads all the information about the current state of the overrides, then updates that based on any submitted data. It also works out which capabilities should be locked for this user.
- Parameters
-
object | $context | the context this table relates to. |
integer | $roleid | the role being overridden. |
boolean | $safeoverridesonly | If true, the user is only allowed to override capabilities with no risks. |
Reimplemented from core_role_capability_table_with_risks.
◆ 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_header_cells()
core_role_capability_table_with_risks::add_header_cells |
( |
| ) |
|
|
protectedinherited |
◆ add_permission_cells()
core_role_override_permissions_table_advanced::add_permission_cells |
( |
|
$capability | ) |
|
|
protected |
◆ add_row_cells()
core_role_capability_table_with_risks::add_row_cells |
( |
|
$capability | ) |
|
|
protectedinherited |
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.
◆ display()
core_role_capability_table_with_risks::display |
( |
| ) |
|
|
inherited |
◆ get_risk_icon()
core_role_capability_table_with_risks::get_risk_icon |
( |
|
$type | ) |
|
|
inherited |
Print a risk icon, as a link to the Risks page on Moodle Docs.
- Parameters
-
string | $type | the type of risk, will be one of the keys from the get_all_risks array. Must start with 'risk'. |
◆ get_row_attributes()
core_role_override_permissions_table_advanced::get_row_attributes |
( |
|
$capability | ) |
|
|
protected |
This method adds an additional class to a row if capability is other than inherited.
- Parameters
-
- Return values
-
Reimplemented from core_role_capability_table_base.
◆ get_row_classes()
core_role_capability_table_with_risks::get_row_classes |
( |
|
$capability | ) |
|
|
protectedinherited |
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.
◆ load_parent_permissions()
core_role_override_permissions_table_advanced::load_parent_permissions |
( |
| ) |
|
|
protected |
◆ num_extra_columns()
core_role_capability_table_with_risks::num_extra_columns |
( |
| ) |
|
|
protectedinherited |
◆ 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. |
◆ read_submitted_permissions()
core_role_capability_table_with_risks::read_submitted_permissions |
( |
| ) |
|
|
inherited |
◆ save_changes()
core_role_capability_table_with_risks::save_changes |
( |
| ) |
|
|
inherited |
◆ 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: