function dynamic_banner_menu in Dynamic Banner 6
Same name and namespace in other branches
- 7.2 dynamic_banner.module \dynamic_banner_menu()
- 7 dynamic_banner.module \dynamic_banner_menu()
- 8.x dynamic_banner.module \dynamic_banner_menu()
Implements hook_menu().
File
- ./
dynamic_banner.module, line 58 - Distributed under GNU GPL version 3
Code
function dynamic_banner_menu() {
$items = array();
// settings page located in admin pages
$items['admin/build/banners/settings'] = array(
'title' => t('Settings'),
'description' => 'A page for the dynamic banner settings',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'dynamic_banner_settings',
),
'access arguments' => array(
'administer dynamic_banner',
),
'type' => MENU_LOCAL_TASK,
'file' => 'includes/callbacks.inc',
);
// admin menu located in site building
$items['admin/build/banners'] = array(
'title' => t('Dynamic Banner'),
'description' => 'Configure the Dynamic Banner.',
'page callback' => 'dynamic_banner_admin_page',
'access arguments' => array(
'administer dynamic_banner',
),
'file' => 'includes/callbacks.inc',
);
// the defaulted page to load on menu click
$items['admin/build/banners/list'] = array(
'title' => t('List Banners'),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
// part of the path when using querys
$items['admin/build/banners/edit/%'] = array(
'title' => t('Edit Banner'),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'dynamic_banner_admin_form',
4,
),
'access arguments' => array(
'administer dynamic_banner',
),
'type' => MENU_CALLBACK,
'file' => 'includes/callbacks.inc',
);
// part of the path when using querys
$items['admin/build/banners/delete'] = array(
'title' => t('Delete Banner'),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'dynamic_banner_admin_delete_confirm',
),
'access arguments' => array(
'administer dynamic_banner',
),
'type' => MENU_CALLBACK,
'file' => 'includes/callbacks.inc',
);
// a part of the local menu (top)
$items['admin/build/banners/add'] = array(
'title' => t('Add Banner'),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'dynamic_banner_admin_form',
),
'access arguments' => array(
'administer dynamic_banner',
),
'type' => MENU_LOCAL_TASK,
'file' => 'includes/callbacks.inc',
);
// a part of the local menu (top)
$items['admin/build/banners/default'] = array(
'title' => t('Default Banner'),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'dynamic_banner_default_admin_form',
),
'access arguments' => array(
'administer dynamic_banner',
),
'type' => MENU_LOCAL_TASK,
'file' => 'includes/callbacks.inc',
);
return $items;
}