public function GroupPermissionHandlerInterface::getPermissions in Group 2.0.x
Same name and namespace in other branches
- 8 src/Access/GroupPermissionHandlerInterface.php \Drupal\group\Access\GroupPermissionHandlerInterface::getPermissions()
Gets all defined group permissions.
Parameters
bool $include_plugins: (optional) Whether to also include the permissions defined by all installed group content plugins. Defaults to FALSE.
Return value
array An array whose keys are permission names and whose corresponding values are arrays containing the following key-value pairs:
- title: The untranslated human-readable name of the permission, to be shown on the permission administration page. You may use placeholders as you would in t().
- title_args: (optional) The placeholder values for the title.
- description: (optional) An untranslated description of what the permission does. You may use placeholders as you would in t().
- description_args: (optional) The placeholder values for the description.
- restrict access: (optional) A boolean which can be set to TRUE to indicate that site administrators should restrict access to this permission to trusted users. This should be used for permissions that have inherent security risks across a variety of potential use cases. When set to TRUE, a standard warning message will be displayed with the permission on the permission administration page. Defaults to FALSE.
- warning: (optional) An untranslated warning message to display for this permission on the permission administration page. This warning overrides the automatic warning generated by 'restrict access' being set to TRUE. This should rarely be used, since it is important for all permissions to have a clear, consistent security warning that is the same across the site. Use the 'description' key instead to provide any information that is specific to the permission you are defining. You may use placeholders as you would in t().
- warning_args: (optional) The placeholder values for the warning.
- allowed for: (optional) An array of strings that define which membership types can use this permission. Possible values are: 'anonymous', 'outsider', 'member'. Will default to all three when left empty.
- provider: (optional) The provider name of the permission. Defaults to the module providing the permission. You may set this to another module's name to make it appear as if the permission was provided by that module.
- section: (optional) The section name of the permission. This is used to maintain a clear overview on the permissions form. Defaults to the plugin name for plugin provided permissions and to "General" for all other permissions.
1 method overrides GroupPermissionHandlerInterface::getPermissions()
- GroupPermissionHandler::getPermissions in src/
Access/ GroupPermissionHandler.php - Gets all defined group permissions.
File
- src/
Access/ GroupPermissionHandlerInterface.php, line 57
Class
- GroupPermissionHandlerInterface
- Defines an interface to list available permissions.
Namespace
Drupal\group\AccessCode
public function getPermissions($include_plugins = FALSE);