function regcode_og_rules_list_markup in Registration codes 6.2
Return the formatted HTML list
1 call to regcode_og_rules_list_markup()
- regcode_og_admin in regcode_og/
regcode_og.module - Admin page for role assignment
File
- regcode_og/
regcode_og.module, line 111
Code
function regcode_og_rules_list_markup() {
$headings = array(
t('Rule ID'),
t('Term'),
t('Group ID'),
t('Group Name'),
t('Actions'),
);
$rows = regcode_og_get_rules(array(), TRUE);
$group_name_mapping = og_all_groups_options();
// Add actions
foreach ($rows as &$row) {
$row = array_map('check_plain', $row);
$row['group_name'] = $group_name_mapping[$row['ogid']];
$row['action'] = l(t('Remove'), 'admin/user/regcode/og/delete/' . $row['id'], array(
'query' => array(
'token' => drupal_get_token($row['id']),
),
));
}
return theme('table', $headings, $rows);
}