You are here

function imce_menu in IMCE 6

Same name and namespace in other branches
  1. 5 imce.module \imce_menu()
  2. 6.2 imce.module \imce_menu()
  3. 7 imce.module \imce_menu()

Implementation of hook_menu().

File

./imce.module, line 6

Code

function imce_menu() {
  $items = array();
  $access = array(
    'administer imce(execute PHP)',
  );
  $items['imce'] = array(
    'title' => 'File browser',
    'page callback' => 'imce_page',
    'access callback' => 'imce_access',
    'file' => 'inc/page.inc',
    'type' => MENU_CALLBACK,
  );
  $items['admin/settings/imce'] = array(
    'title' => 'IMCE',
    'description' => 'Control how your image/file browser works.',
    'page callback' => 'imce_admin',
    'access arguments' => $access,
    'file' => 'inc/admin.inc',
  );
  $items['admin/settings/imce/profiles'] = array(
    'title' => 'Settings',
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/settings/imce/subdirectory'] = array(
    'title' => 'Directory creation tool',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'imce_form_subdirectory',
    ),
    'access arguments' => $access,
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
    'file' => 'inc/subdir.inc',
  );
  $items['admin/settings/imce/profile'] = array(
    'title' => 'Add new profile',
    'page callback' => 'imce_profile_operations',
    'access arguments' => $access,
    'type' => MENU_CALLBACK,
    'file' => 'inc/admin.inc',
  );
  $items['user/%user/imce'] = array(
    'title' => 'File browser',
    'page callback' => 'imce_user_page',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'imce_user_page_access',
    'access arguments' => array(
      1,
    ),
    'file' => 'inc/page.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
  );
  return $items;
}