Function __global->get_category_permissions_for_environment
Definitions
sources/permissions2.php
- Gather the permissions for the specified category as a form field input matrix.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $permission_module | ID_TEXT | No | No | required parameter | N/A | N/A | The permission module being checked for category access |
| $category | ?ID_TEXT | No | No | required parameter | N/A | N/A | The category being checked for access (often, a number cast to a string) (null: new category) |
| $page | ?ID_TEXT | No | No | Null | N/A | N/A | The page this is for (null: current page) |
| $help | ?Tempcode | No | No | Null | N/A | N/A | Extra help to show in interface (null: none) |
| $new_category | boolean | No | No | False | N/A | N/A | Whether this is a new category (don't load permissions, default to on) |
| $pinterface_view | ?Tempcode | No | No | Null | N/A | N/A | Label for view permissions (null: default) |
Returns
- The form field matrix
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Gather the permissions for the specified category as a form field input matrix.
*
* @param ID_TEXT $permission_module The permission module being checked for category access
* @param ?ID_TEXT $category The category being checked for access (often, a number cast to a string) (null: new category)
* @param ?ID_TEXT $page The page this is for (null: current page)
* @param ?Tempcode $help Extra help to show in interface (null: none)
* @param boolean $new_category Whether this is a new category (don't load permissions, default to on)
* @param ?Tempcode $pinterface_view Label for view permissions (null: default)
* @return Tempcode The form field matrix
*/
function get_category_permissions_for_environment(string $permission_module, ?string $category, ?string $page = null, ?object $help = null, bool $new_category = false, ?object $pinterface_view = null) : object
* Gather the permissions for the specified category as a form field input matrix.
*
* @param ID_TEXT $permission_module The permission module being checked for category access
* @param ?ID_TEXT $category The category being checked for access (often, a number cast to a string) (null: new category)
* @param ?ID_TEXT $page The page this is for (null: current page)
* @param ?Tempcode $help Extra help to show in interface (null: none)
* @param boolean $new_category Whether this is a new category (don't load permissions, default to on)
* @param ?Tempcode $pinterface_view Label for view permissions (null: default)
* @return Tempcode The form field matrix
*/
function get_category_permissions_for_environment(string $permission_module, ?string $category, ?string $page = null, ?object $help = null, bool $new_category = false, ?object $pinterface_view = null) : object

