You are here

function varnish_form_alter in Varnish 5

Same name and namespace in other branches
  1. 6 varnish.module \varnish_form_alter()

Implementation of hook_form_alter()

Add our submit callback to the "clear caches" button.

File

./varnish.module, line 119
varnish.module Provide drupal hooks for integration with the Varnish control layer.

Code

function varnish_form_alter($form_id, &$form) {
  if ($form_id == 'system_performance_settings') {
    $form['#submit']['varnish_purge_all_pages'] = array();
  }
}