You are here

function schema_menu in Schema 7

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

Implements hook_menu().

File

./schema.module, line 47
The Schema module provides functionality built on the Schema API.

Code

function schema_menu() {
  $items['admin/structure/schema'] = array(
    'title' => 'Schema',
    'description' => 'Manage the database schema for this system.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'schema_compare',
    ),
    'access arguments' => array(
      'administer schema',
    ),
    'file' => 'schema.pages.inc',
  );
  $items['admin/structure/schema/compare'] = array(
    'title' => 'Compare',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/structure/schema/describe'] = array(
    'title' => 'Describe',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'schema_describe',
    ),
    'weight' => -8,
    'access arguments' => array(
      'administer schema',
    ),
    'file' => 'schema.pages.inc',
  );
  $items['admin/structure/schema/inspect'] = array(
    'title' => 'Inspect',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'schema_inspect',
    ),
    'weight' => -6,
    'access arguments' => array(
      'administer schema',
    ),
    'file' => 'schema.pages.inc',
  );
  $items['admin/structure/schema/sql'] = array(
    'title' => 'SQL',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'schema_sql',
    'weight' => -4,
    'access arguments' => array(
      'administer schema',
    ),
    'file' => 'schema.pages.inc',
  );

  // This can't work unless we rename the functions in database.*.inc.
  // global $_schema_engines;
  // if (FALSE && isset($_schema_engines) && is_array($_schema_engines)) {
  //   foreach ($_schema_engines as $engine) {
  //     $items['admin/structure/schema/sql/' . $engine] = array(
  //       'title' => $engine,
  //       'type' => ($engine == db_driver() ? MENU_DEFAULT_LOCAL_TASK :
  //         MENU_LOCAL_TASK),
  //       'page callback' => 'schema_sql',
  //       'callback arguments' => $engine,
  //       'access arguments' => array('administer schema'),
  //       );
  //   }
  // }
  $items['admin/structure/schema/show'] = array(
    'title' => 'Show',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'schema_show',
    'weight' => -2,
    'access arguments' => array(
      'administer schema',
    ),
    'file' => 'schema.pages.inc',
  );
  $items['admin/structure/schema/settings'] = array(
    'title' => 'Settings',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'schema_settings_form',
    ),
    'weight' => 50,
    'access arguments' => array(
      'administer schema',
    ),
    'file' => 'schema.admin.inc',
  );
  return $items;
}