function theme_activity_settings_actions_list in Activity 7
Same name and namespace in other branches
- 6.2 activity.module \theme_activity_settings_actions_list()
Theme function to display a list of available activity actions.
1 theme call to theme_activity_settings_actions_list()
- activity_admin_overview in ./
activity.admin.inc - Menu callback to display all the currently setup Activities.
File
- ./
activity.module, line 727 - Records Activity across the site and surfaces that to Views.
Code
function theme_activity_settings_actions_list($vars) {
$header = array(
t('Label'),
t('Hook'),
t('Operations'),
);
$hooks = activity_cache_get('hooks');
foreach ($vars['results'] as $result) {
$handler = activity_handler_load($result->aid);
$operations = array(
l(t('configure'), 'admin/structure/activity/configure/' . $result->aid),
l(t('delete'), 'admin/structure/activity/delete/' . $result->aid),
);
if ($handler->batch) {
$operations[] = l(t('update messages'), 'admin/structure/activity/recreate/' . $result->aid . '/' . drupal_get_token($result->aid));
$operations[] = l(t('regenerate messages'), 'admin/structure/activity/regenerate/' . $result->aid . '/' . drupal_get_token($result->aid));
}
$rows[] = array(
$result->label,
$hooks[$result->hook]['name'],
implode(' | ', $operations),
);
}
$output = theme('table', array(
'header' => $header,
'rows' => $rows,
));
return $output;
}