function config_perms_perms in Custom Permissions 7.2
Same name and namespace in other branches
- 6.2 config_perms.module \config_perms_perms()
Load all permissions
6 calls to config_perms_perms()
- config_perms_admin_form in ./
config_perms.admin.inc - Administration form
- config_perms_admin_form_validate in ./
config_perms.admin.inc - Validate handler.
- config_perms_menu_alter in ./
config_perms.module - Implements hook_menu_alter().
- config_perms_permission in ./
config_perms.module - Implements hook_permission().
- config_perms_update_7201 in ./
config_perms.install - Fix permissions that were incorrectly stored with escaped HTML characters.
File
- ./
config_perms.module, line 17 - Allows additional permissions to be created and managed through a administration form
Code
function config_perms_perms($machine_name = NULL, $rebuild = FALSE) {
// Load current perms
$perms = cache_get('config_perms');
// Rebuild if the cache doesn't exist or if we should force a rebuild. If the
// cache exists, we'll need to point to the data property of the cache object
// in order to maintain the same structure.
if (!$perms || $rebuild) {
$perms = config_perms_cache_rebuild();
}
else {
$perms = $perms->data;
}
return $machine_name ? $perms[$machine_name] : $perms;
}