function varnish_menu in Varnish 7
Same name and namespace in other branches
- 5 varnish.module \varnish_menu()
- 6 varnish.module \varnish_menu()
Implements hook_menu().
Set up admin settings callbacks, etc.
File
- ./
varnish.module, line 25 - Common functions used for the module.
Code
function varnish_menu() {
$items = array();
$items['admin/config/development/varnish'] = array(
'title' => 'Varnish',
'description' => 'Configure your varnish integration.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'varnish_admin_settings_form',
),
'access arguments' => array(
'administer varnish',
),
'file' => 'varnish.admin.inc',
);
$items['admin/config/development/varnish/general'] = array(
'title' => 'General',
'description' => 'Configure Varnish servers and cache invalidation settings',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -5,
);
// Varnish 3 has removed the stats command from the terminal, so
// we can't provide this functionality for varnish 3 users
// currently.
if (floatval(variable_get('varnish_version', 2.1)) < 3) {
$items['admin/reports/varnish'] = array(
'title' => 'Varnish status',
'description' => 'Get the output of varnishstat.',
'page callback' => 'varnish_admin_reports_page',
'access arguments' => array(
'administer varnish',
),
'file' => 'varnish.admin.inc',
);
}
return $items;
}