You are here

function regcode_og_get_list_markup in Registration codes 6

Return the formatted HTML list

1 call to regcode_og_get_list_markup()
regcode_og_admin in regcode_og/regcode_og.module
Admin page for role assignment

File

regcode_og/regcode_og.module, line 109

Code

function regcode_og_get_list_markup() {
  $headings = array(
    t('Id'),
    t('Category'),
    t('Group ID'),
    t('Group Name'),
    t('Actions'),
  );
  $rows = regcode_og_get_rules();
  $group_name_mapping = og_all_groups_options();

  // Add actions
  foreach ($rows as &$row) {
    $row['group_name'] = $group_name_mapping[$row['ogid']];
    $row = array_map('check_plain', $row);
    $row['action'] = l(t('Remove'), 'admin/user/regcodes/ogs/delete/' . $row['id'], array(
      'query' => array(
        'token' => $row['id'],
      ),
    ));
  }
  return theme('table', $headings, $rows);
}