You are here

function varnish_focal_point_purge_help in Varnish purger 8

Same name and namespace in other branches
  1. 8.2 modules/varnish_focal_point_purge/varnish_focal_point_purge.module \varnish_focal_point_purge_help()

Implements hook_help().

File

modules/varnish_focal_point_purge/varnish_focal_point_purge.module, line 19
Contains varnish_focal_point_purge.module.

Code

function varnish_focal_point_purge_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.varnish_focal_point_purge':
      $output = '';
      $output .= '<h2>' . t('About') . '</h2>';
      $output .= '<p>' . t('Purge focal point entities after they are updated') . '</p>';
      $output .= '<p>' . t('You need to setup Varnish to listen to the request method URIBAN. Example:') . '</p>';
      $output .= '<pre><code>if (req.method == "URIBAN") {<br />';
      $output .= '  ban("req.http.host == " + req.http.host + " && req.url == " + req.url);<br />';
      $output .= '  # Throw a synthetic page so the request won\'t go to the backend.<br />';
      $output .= '  return (synth(200, "Ban added."));<br />';
      $output .= '}</code></pre>';
      return $output;
    default:
  }
}