function mmenu_menu in Mobile sliding menu 7
Same name and namespace in other branches
- 7.3 mmenu.module \mmenu_menu()
- 7.2 mmenu.module \mmenu_menu()
Implements hook_menu().
File
- ./
mmenu.module, line 11 - Primarily Drupal hooks and global API functions to manipulate mmenus.
Code
function mmenu_menu() {
$mmenus = mmenu_list();
$items['admin/config/mmenu'] = array(
'title' => 'Mobile sliding menu',
'page callback' => 'mmenu_admin_settings',
'access arguments' => array(
'administer mmenu',
),
'file' => 'mmenu.admin.inc',
);
$count = 0;
foreach ($mmenus as $mmenu) {
if ($count == 0) {
$items['admin/config/mmenu']['page arguments'] = array(
$mmenu['name'],
);
}
$items['admin/config/mmenu/' . $mmenu['name']] = array(
'title' => $mmenu['title'],
'page callback' => 'drupal_get_form',
'page arguments' => array(
'mmenu_admin_settings_form',
$mmenu['name'],
),
'access arguments' => array(
'administer mmenu',
),
'file' => 'mmenu.admin.inc',
'type' => MENU_LOCAL_TASK,
'weight' => $count++,
);
}
return $items;
}