function panels_mini_menu in Panels 5.2
Same name and namespace in other branches
- 6.3 panels_mini/panels_mini.module \panels_mini_menu()
- 6.2 panels_mini/panels_mini.module \panels_mini_menu()
- 7.3 panels_mini/panels_mini.module \panels_mini_menu()
Implementation of hook_menu().
File
- panels_mini/
panels_mini.module, line 41 - panels_mini.module
Code
function panels_mini_menu($may_cache) {
if ($may_cache) {
$access = user_access('create mini panels');
$items[] = array(
'path' => 'admin/panels/panel-mini',
'title' => t('Mini panels'),
'access' => $access,
'callback' => 'panels_mini_list_page',
'description' => t('Create and administer mini panels (panels exposed as blocks).'),
);
$items[] = array(
'path' => 'admin/panels/panel-mini/list',
'title' => t('List'),
'access' => $access,
'callback' => 'panels_mini_list_page',
'weight' => -10,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items[] = array(
'path' => 'admin/panels/panel-mini/add',
'title' => t('Add'),
'access' => $access,
'callback' => 'panels_mini_add_page',
'type' => MENU_LOCAL_TASK,
);
$items[] = array(
'path' => 'admin/panels/panel-mini/import',
'title' => t('Import'),
'access' => $access,
'callback' => 'panels_mini_import_mini',
'type' => MENU_LOCAL_TASK,
);
$items[] = array(
'path' => 'admin/panels/panel-mini/settings',
'title' => t('Settings'),
'access' => $access,
'callback' => 'panels_mini_settings',
'type' => MENU_LOCAL_TASK,
);
$items[] = array(
'path' => 'admin/panels/panel-mini/disable',
'access' => $access,
'callback' => 'panels_mini_disable_page',
'weight' => -1,
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'admin/panels/panel-mini/enable',
'access' => $access,
'callback' => 'panels_mini_enable_page',
'weight' => -1,
'type' => MENU_CALLBACK,
);
}
else {
if (arg(0) == 'admin' && arg(1) == 'panels' && arg(2) == 'panel-mini') {
$mini = panels_mini_load(arg(3));
if ($mini && empty($mini->disabled)) {
$items = array();
panels_mini_menu_items($items, "admin/panels/panel-mini/{$mini->name}", $mini);
}
}
}
return $items;
}