function activity_get_module_info in Activity 6.2
Get a list of modules that support the current activity API.
20 calls to activity_get_module_info()
- activity_access_realms in ./
activity.module - Return all the allowed realms for Activity Access.
- activity_batch_load in ./
activity.module - Menu loader function to load batch-able action_id.
- activity_batch_regenerate_step in ./
activity.admin.inc - Batch regeneration step.
- activity_count_modules in ./
activity.module - FAPI submit callback to count the number of enabled Activity access modules.
- activity_form_system_modules_alter in ./
activity.module - Implementation of hook_form-$form-id_alter().
File
- ./
activity.module, line 12 - Primarily Drupal hooks and global API functions to manipulate activity.
Code
function activity_get_module_info($module_spec = NULL, $reset = FALSE) {
static $cache = NULL;
if ($reset) {
$cache = NULL;
}
if (!isset($cache)) {
$cache = array();
foreach (module_implements('activity_info') as $module) {
$function = $module . '_activity_info';
$info = $function();
if (isset($info->api) && $info->api == 2.0) {
// Set the defaults. Not all modules implement the full api
if (!isset($info->path)) {
$info->path = drupal_get_path('module', $module);
}
if (!isset($info->hooks)) {
$info->hooks = array();
}
if (!isset($info->objects)) {
$info->objects = array();
}
if (!isset($info->realms)) {
$info->realms = array();
}
if (!isset($info->types)) {
$info->types = array();
}
if (!isset($info->eid_field)) {
$info->eid_field = '';
}
// Load up the activity.inc file if it exists.
if (file_exists('./' . $info->path . '/' . $module . '.activity.inc')) {
require_once './' . $info->path . '/' . $module . '.activity.inc';
}
$cache[$module] = $info;
}
}
}
if ($module_spec) {
return $cache[$module_spec];
}
return $cache;
}