You are here

function file_entity_test_menu in D7 Media 7

Implements hook_menu().

File

file_entity/tests/file_entity_test.module, line 12
File Entity Test

Code

function file_entity_test_menu() {
  $items = array();
  $items['file-entity-test/file/add'] = array(
    'title' => 'Add file',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'file_entity_test_add_form',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'file_entity_test.pages.inc',
  );
  $items['file-entity-test/file/%file'] = array(
    'title' => 'View file',
    'page callback' => 'file_entity_test_view_page',
    'page arguments' => array(
      2,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'file_entity_test.pages.inc',
  );
  $items['file-entity-test/file/%file/view'] = array(
    'title' => 'View',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['file-entity-test/file/%file/preview'] = array(
    'title' => 'Preview',
    'page callback' => 'file_entity_test_preview_page',
    'page arguments' => array(
      2,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'weight' => 0,
    'type' => MENU_LOCAL_TASK,
    'file' => 'file_entity_test.pages.inc',
  );
  $items['file-entity-test/file/%file/edit'] = array(
    'title' => 'Edit',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'file_entity_test_edit_form',
      2,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'weight' => 1,
    'type' => MENU_LOCAL_TASK,
    'file' => 'file_entity_test.pages.inc',
  );
  return $items;
}