function empty_page_menu in Empty Page 7
Implements hook_menu().
File
- ./
empty_page.module, line 29 - Empty Page module A simple empty page solution. Assists in creating empty menu callbacks, mostly used for pages that only consist of blocks.
Code
function empty_page_menu() {
$items = array();
$items['admin/structure/empty-page'] = array(
'title' => 'Empty Page callbacks',
'description' => 'Manage Empty Page menu callbacks.',
'page callback' => 'empty_page_admin_overview',
'access arguments' => array(
EMPTY_PAGE_PERM_ADMIN_CALLBACKS,
),
'file' => 'empty_page.admin.inc',
);
$items['admin/structure/empty-page/list'] = array(
'title' => 'List',
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/structure/empty-page/add'] = array(
'title' => 'Add Callback',
'description' => 'Create an empty page.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'empty_page_callbacks_form',
),
'access arguments' => array(
EMPTY_PAGE_PERM_ADMIN_CALLBACKS,
),
'type' => MENU_LOCAL_ACTION,
'file' => 'empty_page.admin.inc',
'weight' => 1,
);
$items['admin/structure/empty-page/%/edit'] = array(
'title' => 'Edit',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'empty_page_callbacks_form',
3,
),
'access arguments' => array(
EMPTY_PAGE_PERM_ADMIN_CALLBACKS,
),
'type' => MENU_CALLBACK,
'file' => 'empty_page.admin.inc',
);
$items['admin/structure/empty-page/%/delete'] = array(
'title' => 'Delete',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'empty_page_admin_delete_form',
3,
),
'access arguments' => array(
EMPTY_PAGE_PERM_ADMIN_CALLBACKS,
),
'type' => MENU_CALLBACK,
'file' => 'empty_page.admin.inc',
);
// Create the dynamic callbacks.
foreach (empty_page_get_callbacks() as $cid => $callback) {
$items[$callback->path] = array(
'title' => t($callback->page_title),
'page callback' => 'empty_page_empty',
'access callback' => TRUE,
'type' => MENU_SUGGESTED_ITEM,
);
}
return $items;
}