function messaging_admin_template in Messaging 6
Same name and namespace in other branches
- 6.2 messaging.admin.inc \messaging_admin_template()
- 6.3 messaging.admin.inc \messaging_admin_template()
1 string reference to 'messaging_admin_template'
- messaging_menu in ./
messaging.module - Implementation of hook_menu()
File
- ./
messaging.admin.inc, line 60 - Messaging Framework - Admin UI
Code
function messaging_admin_template() {
$output = '';
// List message groups
$groups = module_invoke_all('messaging', 'message groups');
// Check fallbacks and get root templates for tree-like display
$root = array();
foreach ($groups as $group => $group_info) {
if (empty($group_info['fallback'])) {
$root[] = $group;
}
else {
$groups[$group_info['fallback']]['children'][] = $group;
}
}
// Now build table which will have some indentation
$rows = messaging_admin_template_tree($root, $groups);
$header = array(
t('Message groups'),
t('Description'),
t('Parts'),
);
$output .= theme('table', $header, $rows);
// List sending methods
$rows = array();
messaging_method_list();
foreach (messaging_method_info() as $method => $info) {
$rows[] = array(
'<strong>' . $info['name'] . '</strong>',
!empty($info['description']) ? $info['description'] : '',
);
}
$output .= theme('box', t('Sending methods'), theme('table', NULL, $rows));
return $output;
}