You are here

function sheetnode_menu in Sheetnode 5

Same name and namespace in other branches
  1. 6 sheetnode.module \sheetnode_menu()
  2. 7.2 sheetnode.module \sheetnode_menu()
  3. 7 sheetnode.module \sheetnode_menu()

Implementation of hook_menu().

File

./sheetnode.module, line 230

Code

function sheetnode_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'node/add/sheetnode',
      'title' => t('Sheetnode'),
      'access' => user_access('create sheetnode'),
    );
    $items[] = array(
      'path' => 'sheetnode/load',
      'type' => MENU_CALLBACK,
      'callback' => '_sheetnode_ajax_load',
      'access' => user_access('access content'),
    );
    $items[] = array(
      'path' => 'sheetnode/field',
      'type' => MENU_CALLBACK,
      'callback' => '_sheetnode_ajax_field',
      'access' => user_access('access content'),
    );
    $items[] = array(
      'path' => 'node/add/sheetnode_template',
      'title' => t('Sheetnode import from template'),
      'access' => user_access('create sheetnode'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'sheetnode_import_template',
      ),
    );
    $items[] = array(
      'path' => 'admin/settings/sheetnode',
      'title' => t('Sheetnode'),
      'access' => user_access('administer site configuration'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'sheetnode_admin_settings',
      ),
    );
    $items[] = array(
      'path' => 'admin/settings/sheetnode/general',
      'title' => t('General'),
      'access' => user_access('administer site configuration'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'sheetnode_admin_settings',
      ),
      'type' => MENU_DEFAULT_LOCAL_TASK,
      'weight' => -10,
    );
  }
  return $items;
}