You are here

function nat_menu in Node Auto Term [NAT] 5

Same name and namespace in other branches
  1. 6.2 nat.module \nat_menu()
  2. 6 nat.module \nat_menu()
  3. 7.2 nat.module \nat_menu()
  4. 7 nat.module \nat_menu()

Implementation of hook_menu().

File

./nat.module, line 44
NAT - node auto term - is a helper module that automatically creates a term using the same title as a node.

Code

function nat_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/settings/nat',
      'title' => t('NAT'),
      'description' => t('Establish node - node relationships via the taxonomy module.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'nat_settings_form',
      ),
      'access' => user_access('administer NAT configuration'),
    );
    $items[] = array(
      'path' => 'admin/settings/nat/settings',
      'title' => t('Settings'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'nat_settings_form',
      ),
      'access' => user_access('administer NAT configuration'),
      'type' => MENU_DEFAULT_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/settings/nat/sync',
      'title' => t('Sync'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'nat_sync_form',
      ),
      'access' => user_access('administer NAT configuration'),
      'type' => MENU_LOCAL_TASK,
    );
  }
  return $items;
}