You are here

function og_vocab_menu in OG Vocabulary 7

Same name and namespace in other branches
  1. 5 og_vocab.module \og_vocab_menu()
  2. 6 og_vocab.module \og_vocab_menu()

Implements hook_menu().

File

./og_vocab.module, line 16
Give each group its own system controlled vocabularies.

Code

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

  // Add our own autocomplete callback to pass also the group and
  // vocabulary info.
  $items['og-vocab/autocomplete/single/%entity_object'] = array(
    'load arguments' => array(
      'og_vocab',
    ),
    'title' => 'Entity Reference Autocomplete',
    'description' => 'Autocomplete a reference for the vocabulary and the group',
    'page callback' => 'og_vocab_autocomplete_callback',
    'page arguments' => array(
      2,
      3,
    ),
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  $items['og-vocab/autocomplete/tags/%entity_object'] = array(
    'load arguments' => array(
      'og_vocab',
    ),
    'title' => 'Entity Reference Autocomplete',
    'description' => 'Autocomplete a reference for the vocabulary and the group',
    'page callback' => 'og_vocab_autocomplete_callback',
    'page arguments' => array(
      2,
      3,
    ),
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  $items['admin/config/group/og-vocab'] = array(
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'og_vocab_admin_settings',
    ),
    'title' => 'OG vocabulary settings',
    'access arguments' => array(
      'administer group',
    ),
    'description' => 'OG vocabulary module settings.',
    'file' => 'includes/og_vocab.admin.inc',
  );
  return $items;
}