In Elgg groups have a feature where you can enable or disable different tools for a group. These tools are provided by other plugins like blog or file.
Plugins need to tell Elgg that these tools exist. This can be done by using the
If an existing tool option needs to be removed you can use
On a group edit form you can turn the tools on or off for the specific group. You can also do so programmatically as shown in the code example below.
$group = get_entity($group_guid); // enables the file tool for the group $group->enableTool('file'); // disables the file tool for the group $group->disableTool('file');
If you want to allow a certain feature in a group only if the group tool option is enabled, you can check this using
It is also a possibility to use a gatekeeper function to prevent access to a group page based on an enabled tool.
Read more about gatekeepers here: Gatekeepers
If you need the configured group tool options for a specific group you can use the