You are here

function og_subgroups_menu in Subgroups for Organic groups 6

Same name and namespace in other branches
  1. 5.4 og_subgroups.module \og_subgroups_menu()
  2. 5 og_subgroups.module \og_subgroups_menu()
  3. 5.3 og_subgroups.module \og_subgroups_menu()

Implementation of hook_menu().

File

./og_subgroups.module, line 18
Maintains a hierarchy of groups created by the orgainc groups module.

Code

function og_subgroups_menu() {
  $items['subgroups/tree/%node'] = array(
    'description' => 'JS callback to generate a group hierarchy tree',
    'page callback' => 'og_subgroups_group_tree_json',
    'page arguments' => array(
      2,
    ),
    'access arguments' => array(
      'access content',
    ),
    // Should we make a custom perm?
    'file' => 'json.inc',
    'file path' => drupal_get_path('module', 'og_subgroups') . '/includes',
  );
  $items['admin/og/subgroups'] = array(
    'title' => 'Subgroups configuration',
    'description' => 'Enable and configure groups to be posted inside groups',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'og_subgroups_settings',
    ),
    'access arguments' => array(
      'administer groups hierarchy',
    ),
    'weight' => 0,
    'file' => 'admin.inc',
    'file path' => drupal_get_path('module', 'og_subgroups') . '/includes',
  );
  $items['admin/og/subgroups/settings'] = array(
    'title' => 'Settings',
    'weight' => 0,
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  return $items;
}