Function Resource_fs_base->set_resource_privileges_from_preset
Definitions
sources/resource_fs_base_class.php
- Set resource privileges from a preset on the resource.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $filename | ?ID_TEXT | No | No | required parameter | N/A | N/A | Resource filename (assumed to be of a folder type) (null: $resource_type & $category specified instead) |
| $group_presets | array | No | No | required parameter | N/A | N/A | A mapping from group ID to preset value. Preset values are 0 (read only) to 3 (moderation) |
| $resource_type | ?ID_TEXT | No | No | Null | N/A | N/A | The resource type (null: $filename specified instead) |
| $category | ?ID_TEXT | No | No | Null | N/A | N/A | The resource ID (null: $filename specified instead) |
Preview
Code (PHP)
/**
* Set resource privileges from a preset on the resource.
*
* @param ?ID_TEXT $filename Resource filename (assumed to be of a folder type) (null: $resource_type & $category specified instead)
* @param array $group_presets A mapping from group ID to preset value. Preset values are 0 (read only) to 3 (moderation)
* @param ?ID_TEXT $resource_type The resource type (null: $filename specified instead)
* @param ?ID_TEXT $category The resource ID (null: $filename specified instead)
*/
public function set_resource_privileges_from_preset(?string $filename, array $group_presets, ?string $resource_type = null, ?string $category = null)
* Set resource privileges from a preset on the resource.
*
* @param ?ID_TEXT $filename Resource filename (assumed to be of a folder type) (null: $resource_type & $category specified instead)
* @param array $group_presets A mapping from group ID to preset value. Preset values are 0 (read only) to 3 (moderation)
* @param ?ID_TEXT $resource_type The resource type (null: $filename specified instead)
* @param ?ID_TEXT $category The resource ID (null: $filename specified instead)
*/
public function set_resource_privileges_from_preset(?string $filename, array $group_presets, ?string $resource_type = null, ?string $category = null)

