You are here

function taxonomy_edge_menu in Taxonomy Edge 7.2

Same name and namespace in other branches
  1. 8 taxonomy_edge.module \taxonomy_edge_menu()
  2. 6 taxonomy_edge.module \taxonomy_edge_menu()
  3. 7 taxonomy_edge.module \taxonomy_edge_menu()

Implements hook_menu().

File

./taxonomy_edge.module, line 85
Selecting all children of a given taxonomy term can be a pain. This module makes it easier to do this, by maintaining a complete list of edges for each term using the adjecency matrix graph theory.

Code

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

  // Bring /level and /all back into taxonomy pages and feeds
  $items['taxonomy/term/%taxonomy_term/%'] = array(
    'title' => 'Taxonomy term',
    'title callback' => 'taxonomy_term_title',
    'title arguments' => array(
      2,
    ),
    'page callback' => 'taxonomy_edge_term_page',
    'page arguments' => array(
      2,
      3,
    ),
    'access arguments' => array(
      'access content',
    ),
    'file' => 'taxonomy_edge.pages.inc',
  );
  $items['taxonomy/term/%taxonomy_term/%/feed'] = array(
    'title' => 'Taxonomy term',
    'title callback' => 'taxonomy_term_title',
    'title arguments' => array(
      2,
    ),
    'page callback' => 'taxonomy_edge_term_feed',
    'page arguments' => array(
      2,
      3,
    ),
    'access arguments' => array(
      'access content',
    ),
    'file' => 'taxonomy_edge.pages.inc',
  );

  // settings page
  $items['admin/structure/taxonomy/edge'] = array(
    'title' => 'Edge',
    'description' => 'Administer taxonomy edges',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'taxonomy_edge_settings_form',
    ),
    'access arguments' => array(
      'administer taxonomy edge',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'taxonomy_edge.admin.inc',
  );
  $items['admin/structure/taxonomy/%taxonomy_vocabulary_machine_name/rebuild/%'] = array(
    'title' => 'Rebuild edges',
    'description' => 'Rebuild taxonomy edges',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'taxonomy_edge_rebuild_page_confirm',
      3,
      5,
    ),
    'access arguments' => array(
      'administer taxonomy edge',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'taxonomy_edge.admin.inc',
  );
  return $items;
}