function activity_access_realms in Activity 6.2
Return all the allowed realms for Activity Access.
Return value
array Returns an array of allowed realms.
3 calls to activity_access_realms()
- activity_access_batch_set in ./
activity.admin.inc - FAPI form submit function for the activity_rebuild button.
- activity_get_grants in ./
activity.module - return all the grants for a given activity
- activity_settings_form in ./
activity.admin.inc - Form builder to dispaly settings for activity module
1 string reference to 'activity_access_realms'
- activity_access_batch_set in ./
activity.admin.inc - FAPI form submit function for the activity_rebuild button.
File
- ./
activity.module, line 917 - Primarily Drupal hooks and global API functions to manipulate activity.
Code
function activity_access_realms() {
$enabled_realms = variable_get('activity_access_realms', FALSE);
// If no realms have been explictly set, return all access realms.
if ($enabled_realms === FALSE) {
$enabled_realms = array();
foreach (activity_get_module_info() as $module => $info) {
$enabled_realms = array_merge($enabled_realms, array_keys($info->realms));
}
}
return $enabled_realms;
}