You are here

function flipping_book_menu in Flipping Book 7

Implements hook_menu().

File

./flipping_book.module, line 33
Manage Flipping Book packages into Drupal

Code

function flipping_book_menu() {
  $module_path = drupal_get_path('module', 'flipping_book');
  $items = array();
  $items[FLIPPING_BOOK_MANAGEMENT_PATH] = array(
    'title' => 'Flipping Book',
    'description' => 'Import, delete your Flipping Books',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'flipping_book_management_form',
    ),
    'access arguments' => array(
      'upload flipping_book',
    ),
    'file' => 'flipping_book.pages.inc',
    'file path' => $module_path . '/includes',
  );
  $items[FLIPPING_BOOK_MANAGEMENT_PATH . '/import'] = array(
    'title' => 'Import',
    'access arguments' => array(
      'upload flipping_book',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items[FLIPPING_BOOK_MANAGEMENT_PATH . '/settings'] = array(
    'title' => 'Settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'flipping_book_settings_form',
    ),
    'access arguments' => array(
      'administer flipping_book',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'flipping_book.admin.inc',
    'file path' => $module_path . '/includes',
  );
  $items[FLIPPING_BOOK_MANAGEMENT_PATH . '/%flipping_book/delete'] = array(
    'title' => 'Delete',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'flipping_book_delete_confirm',
      4,
    ),
    'access arguments' => array(
      'administer flipping_book',
    ),
    'type' => MENU_CALLBACK,
    'context' => MENU_CONTEXT_INLINE,
    'file' => 'flipping_book.admin.inc',
    'file path' => $module_path . '/includes',
  );
  return $items;
}