You are here

function homebox_og_menu in Homebox 6.2

Same name and namespace in other branches
  1. 6.3 homebox_og/homebox_og.module \homebox_og_menu()
  2. 7.2 homebox_og/homebox_og.module \homebox_og_menu()

File

homebox_og/homebox_og.module, line 11
Organic Groups integration for Homebox

Code

function homebox_og_menu() {
  $items = array();

  // Admin OG/Homebox settings
  $items['admin/og/homebox'] = array(
    'title' => 'Organic groups Homebox',
    'description' => 'Choose a homebox to act as a group home page',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'homebox_og_group_settings_page',
    ),
    'access callback' => '_homebox_og_user_access_group_settings',
  );

  // Optionally register Homebox page as node tab
  if ($name = variable_get('homebox_og_tab', '')) {
    $page = homebox_get_page($name);
    if ($page) {
      $items['node/%node/' . $page->settings['path']] = array(
        'title' => $page->settings['title'],
        'page callback' => 'homebox_build',
        'page arguments' => array(
          $page,
        ),
        'access callback' => '_homebox_og_user_access_view_homebox',
        'access arguments' => array(
          $page,
          1,
        ),
        'weight' => 1,
        'type' => MENU_LOCAL_TASK,
      );
    }
  }
  return $items;
}