You are here

function file_entity_test_menu in File Entity (fieldable files) 7

Same name and namespace in other branches
  1. 7.3 tests/file_entity_test.module \file_entity_test_menu()
  2. 7.2 tests/file_entity_test.module \file_entity_test_menu()

Implements hook_menu().

File

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;
}