function tripal_stock_menu

2.x tripal_stock.module tripal_stock_menu()
3.x tripal_stock.module tripal_stock_menu()
1.x tripal_stock.module tripal_stock_menu()

Implements hook_menu(): Adds menu items for the tripal_stock

Return value

Menu definitions for the tripal_stock

Related topics

File

tripal_stock/tripal_stock.module, line 40
Implements Tripal Stock Module hooks

Code

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

  //Administrative settings menu-----------------
  $items['admin/tripal/tripal_stock'] = array(
    'title' => 'Stocks',
    'description' => 'Basic Description of Tripal Stock Module Functionality',
    'page callback' => 'theme',
    'page arguments' => array('tripal_stock_admin'),
    'access arguments' => array('administer tripal stocks'),
    'type' => MENU_NORMAL_ITEM
  );

  $items['admin/tripal/tripal_stock/configuration'] = array(
    'title' => 'Configuration',
    'description' => 'Settings for Chado Stocks',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('tripal_stock_admin'),
    'access arguments' => array('administer tripal stocks'),
    'type' => MENU_NORMAL_ITEM
  );

  $items['admin/tripal/tripal_stock/sync'] = array(
    'title' => ' Sync Stocks',
    'description' => 'Sync stocks from Chado with Drupal',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('tripal_stock_sync_form'),
    'access arguments' => array('administer tripal stocks'),
    'type' => MENU_NORMAL_ITEM,
  );

  // Adding Secondary Properties-----------------
  $items['node/%cs_node/properties'] = array(
    'title' => 'Add Properties & Synonyms',
    'description' => 'Settings for Chado Stocks',
    'page callback' => 'tripal_stock_add_ALL_property_page',
    'page arguments' => array(1),
    'access arguments' => array('create chado_stock content'),
    'type' => MENU_CALLBACK
  );

  $items['node/%cs_node/db_references'] = array(
    'title' => 'Add Database References',
    'description' => 'Settings for Chado Stocks',
    'page callback' => 'tripal_stock_add_ALL_dbreferences_page',
    'page arguments' => array(1),
    'access arguments' => array('create chado_stock content'),
    'type' => MENU_CALLBACK
  );

  $items['node/%cs_node/relationships'] = array(
    'title' => 'Add Relationships',
    'description' => 'Settings for Chado Stocks',
    'page callback' => 'tripal_stock_add_ALL_relationships_page',
    'page arguments' => array(1),
    'access arguments' => array('create chado_stock content'),
    'type' => MENU_CALLBACK
  );

  //Edit/Deleting Secondary Properties-------------
  $items['node/%cs_node/edit_properties'] = array(
    'title' => 'Edit Properties',
    'description' => 'Settings for Chado Stocks',
    'page callback' => 'tripal_stock_edit_ALL_properties_page',
    'page arguments' => array(1),
    'access arguments' => array('edit chado_stock content'),
    'type' => MENU_LOCAL_TASK,
    'weight' => 8,
  );

  $items['node/%cs_node/edit_relationships'] = array(
    'title' => 'Edit Relationships',
    'description' => 'Settings for Chado Stocks',
    'page callback' => 'tripal_stock_edit_ALL_relationships_page',
    'page arguments' => array(1),
    'access arguments' => array('edit chado_stock content'),
    'type' => MENU_LOCAL_TASK,
    'weight' => 9,
  );

  $items['node/%cs_node/edit_db_references'] = array(
    'title' => 'Edit DB References',
    'description' => 'Settings for Chado Stocks',
    'page callback' => 'tripal_stock_edit_ALL_dbreferences_page',
    'page arguments' => array(1),
    'access arguments' => array('edit chado_stock content'),
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
  );

  // the menu link for addressing any stock (by name, uniquename, synonym)
  $items['stock/%'] = array(
    'page callback' => 'tripal_stock_match_stocks_page',
    'page arguments' => array(1),
    'access arguments' => array('access chado_stock content'),
    'type' => MENU_LOCAL_TASK,
  );
  return $items;
}