You are here

function og_ui_group_admin_overview in Organic groups 7

Same name and namespace in other branches
  1. 7.2 og_ui/og_ui.admin.inc \og_ui_group_admin_overview()

Provide an overview of the administrator menu items.

Parameters

$entity_type: The entity type.

$etid: The entity ID.

1 string reference to 'og_ui_group_admin_overview'
og_ui_menu in og_ui/og_ui.module
Implements hook_menu().

File

og_ui/og_ui.admin.inc, line 40
Admin settings for Organic groups module.

Code

function og_ui_group_admin_overview($entity_type, $etid) {
  og_set_breadcrumb($entity_type, $etid);
  $group = og_get_group($entity_type, $etid);
  $items = og_ui_get_group_admin($group->gid);
  foreach ($items as &$item) {

    // Re-format the URL.
    $item['href'] = "group/{$entity_type}/{$etid}/" . $item['href'];

    // Imitate the menu_get_item() content, so we can pass it to
    // theme_admin_block_content(), so we add the localized_options key.
    $item['localized_options'] = array();
  }
  $form['admin_block_content'] = array(
    '#theme' => 'admin_block_content',
    '#content' => $items,
  );
  return $form;
}