function varnish_menu in Varnish 5
Same name and namespace in other branches
- 6 varnish.module \varnish_menu()
- 7 varnish.module \varnish_menu()
Implementation of hook_menu()
Set up admin settings callbacks, etc.
File
- ./
varnish.module, line 19 - varnish.module Provide drupal hooks for integration with the Varnish control layer.
Code
function varnish_menu() {
$items = array();
$items[] = array(
'path' => 'admin/settings/varnish',
'title' => 'Varnish settings',
'description' => 'Configure your varnish integration.',
'callback' => 'drupal_get_form',
'callback arguments' => array(
'varnish_admin_settings_form',
),
'access' => user_access('administer varnish'),
);
$items[] = array(
'path' => 'admin/reports/varnish',
'title' => 'Varnish status',
'description' => 'Configure your varnish integration.',
'callback' => 'varnish_admin_reports_page',
'access' => user_access('administer varnish'),
);
$items[] = array(
'path' => 'admin/settings/varnish/cache-clear',
'title' => 'Clear Varnish cache',
'description' => 'Clear your varnish integration.',
'callback' => 'varnish_flush_cache_manually',
'access' => user_access('administer varnish'),
);
return $items;
}