Function __global->get_category_permission_where_clause
Definitions
sources/permissions.php
- Get an SQL WHERE clause for checking member access to a category.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
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_field | ID_TEXT | No | No | required parameter | N/A | N/A | The field in the main query row that holds the category |
| $member_id | ?MEMBER | No | No | required parameter | N/A | N/A | The member to check individual access for (null: none) |
| $groups | string | No | No | required parameter | N/A | N/A | SQL from get_permission_where_clause_groups |
| $row_alias | ID_TEXT | No | No | r | N/A | N/A | The alias for the main query row |
Returns
- SQL
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get an SQL WHERE clause for checking member access to a category.
*
* @param ID_TEXT $permission_module The permission module being checked for
* @param ID_TEXT $category_field The field in the main query row that holds the category
* @param ?MEMBER $member_id The member to check individual access for (null: none)
* @param string $groups SQL from get_permission_where_clause_groups
* @param ID_TEXT $row_alias The alias for the main query row
* @return string SQL
*/
function get_category_permission_where_clause(string $permission_module, string $category_field, ?int $member_id, string $groups, string $row_alias = 'r') : string
* Get an SQL WHERE clause for checking member access to a category.
*
* @param ID_TEXT $permission_module The permission module being checked for
* @param ID_TEXT $category_field The field in the main query row that holds the category
* @param ?MEMBER $member_id The member to check individual access for (null: none)
* @param string $groups SQL from get_permission_where_clause_groups
* @param ID_TEXT $row_alias The alias for the main query row
* @return string SQL
*/
function get_category_permission_where_clause(string $permission_module, string $category_field, ?int $member_id, string $groups, string $row_alias = 'r') : string

