function panels_menu in Panels 5.2
Same name and namespace in other branches
- 8.3 panels.module \panels_menu()
- 5 panels.module \panels_menu()
- 6.3 panels.module \panels_menu()
- 6.2 panels.module \panels_menu()
- 7.3 panels.module \panels_menu()
Implementation of hook_menu
File
- ./
panels.module, line 38 - panels.module Core API for Panels. Provides display editing and rendering capabilities.
Code
function panels_menu($may_cache) {
if ($may_cache) {
$items[] = array(
'path' => 'admin/panels',
'title' => t('Panels'),
'access' => user_access('access administration pages'),
'callback' => 'system_admin_menu_block_page',
'description' => t('Administer items related to the Panels module.'),
);
$items[] = array(
'path' => 'panels/node/autocomplete',
'title' => t('Autocomplete node'),
'callback' => 'panels_node_autocomplete',
'access' => user_access('access content'),
'type' => MENU_CALLBACK,
);
// TODO Deprecated generalized ajax handler. Remove if at all possible.
$items[] = array(
'path' => 'panels/ajax',
'title' => t('ajax'),
'callback' => 'panels_ajax_passthru',
'callback arguments' => array(
'panels_ajax',
),
'access' => user_access('access content'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'panels/common/ajax',
'title' => t('ajax'),
'callback' => 'panels_ajax_passthru',
'callback arguments' => array(
'panels_common_ajax',
),
'access' => user_access('access content'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'panels/ajax/add-content',
'title' => t('ajax'),
'callback' => 'panels_ajax_passthru',
'callback arguments' => array(
'panels_ajax_add_content',
),
'access' => user_access('access content'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'panels/ajax/add-config',
'title' => t('ajax'),
'callback' => 'panels_ajax_passthru',
'callback arguments' => array(
'panels_ajax_add_config',
),
'access' => user_access('access content'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'panels/ajax/configure',
'title' => t('ajax'),
'callback' => 'panels_ajax_passthru',
'callback arguments' => array(
'panels_ajax_configure',
),
'access' => user_access('access content'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'panels/ajax/toggle-shown',
'title' => t('ajax'),
'callback' => 'panels_ajax_passthru',
'callback arguments' => array(
'panels_ajax_toggle_shown',
),
'access' => user_access('access content'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'panels/ajax/cache',
'title' => t('ajax'),
'callback' => 'panels_ajax_passthru',
'callback arguments' => array(
'panels_ajax_cache',
),
'access' => user_access('access content'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'panels/ajax/cache-settings',
'title' => t('ajax'),
'callback' => 'panels_ajax_passthru',
'callback arguments' => array(
'panels_ajax_cache_settings',
),
'access' => user_access('access content'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'panels/ajax/panel_settings',
'title' => t('ajax'),
'callback' => 'panels_ajax_passthru',
'callback arguments' => array(
'panels_panel_settings_ajax',
),
'access' => user_access('access content'),
'type' => MENU_CALLBACK,
);
}
else {
drupal_add_css(panels_get_path('css/panels.css'));
drupal_add_js(panels_get_path('js/panels.js'));
}
return $items;
}