You are here

function imce_menu in IMCE 7

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

Implements hook_menu().

File

./imce.module, line 17
Implements the necessary hooks for the file browser to work properly.

Code

function imce_menu() {
  $items = array();
  $access = array(
    'administer imce',
  );
  $items['imce'] = array(
    'title' => 'File browser',
    'page callback' => 'imce',
    'access callback' => 'imce_access',
    'access arguments' => array(
      FALSE,
      1,
    ),
    'file' => 'inc/imce.page.inc',
    'type' => MENU_CALLBACK,
  );
  $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/imce.page.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
  );
  $items['admin/config/media/imce'] = array(
    'title' => 'IMCE',
    'description' => 'Control how your image/file browser works.',
    'page callback' => 'imce_admin',
    'access arguments' => $access,
    'file' => 'inc/imce.admin.inc',
  );
  if (variable_get('imce_settings_menu_link')) {
    $items['admin/content/imce'] = array(
      'title' => 'IMCE File Browser',
      'description' => 'Admin File Browser',
      'page callback' => 'imce_admin_file_browser',
      'access arguments' => $access,
      'file' => 'inc/imce.admin.inc',
    );
  }
  $items['admin/config/media/imce/profile'] = array(
    'title' => 'Add new profile',
    'page callback' => 'imce_profile_operations',
    'access arguments' => $access,
    'type' => MENU_VISIBLE_IN_BREADCRUMB,
    'file' => 'inc/imce.admin.inc',
  );
  return $items;
}