function boxes_menu in Boxes 7
Same name and namespace in other branches
- 6 boxes.module \boxes_menu()
- 7.2 boxes.module \boxes_menu()
Implements hook_menu().
File
- ./
boxes.module, line 16 - Core functionality for boxes module.
Code
function boxes_menu() {
$items = array();
ctools_include('plugins');
$plugins = ctools_get_plugins('boxes', 'plugins');
foreach ($plugins as $key => $info) {
if (isset($info['title'])) {
$items['admin/structure/block/box-add/' . $key] = array(
'title' => 'Add ' . strtolower($info['title']),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'boxes_add_form',
4,
),
'access arguments' => array(
'administer boxes',
),
'type' => MENU_LOCAL_ACTION,
'file' => 'boxes.admin.inc',
);
}
}
$items['admin/structure/block/manage/boxes/%boxes_box/delete'] = array(
'title' => 'Delete box',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'boxes_delete_form',
5,
),
'access arguments' => array(
'administer boxes',
),
'type' => MENU_CALLBACK,
'file' => 'boxes.admin.inc',
);
$items['admin/config/user-interface/boxes'] = array(
'title' => 'Boxes',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'boxes_settings',
),
'access arguments' => array(
'administer boxes',
),
'file' => 'boxes.admin.inc',
);
return $items;
}