You are here

function http_response_headers_help in HTTP Response Headers 8.2

Same name and namespace in other branches
  1. 7 http_response_headers.module \http_response_headers_help()
  2. 2.0.x http_response_headers.module \http_response_headers_help()

Implements hook_help().

File

./http_response_headers.module, line 15
HTTP Header manipulations module.

Code

function http_response_headers_help($route_name, RouteMatchInterface $route_match) {
  if ($route_name !== 'help.page.http_response_headers') {
    return '';
  }
  $output = '<h3>HTTP Repsonse Headers Help</h3>';
  $output .= 'This module provides basic security headers by default. But in most cases will require further configuration based on your requirements.';
  $help = [
    '#theme' => 'item_list',
    '#list_type' => 'ul',
    '#title' => 'For more information about security headers visit:',
    '#items' => [
      Link::fromTextAndUrl('securityheaders.io', Url::fromUri('https://securityheaders.io/')),
      Link::fromTextAndUrl('scotthelme.co.uk', Url::fromUri('https://scotthelme.co.uk/')),
    ],
    '#attributes' => [
      'class' => 'help-resources',
    ],
    '#wrapper_attributes' => [
      'class' => 'container',
    ],
  ];
  $output .= render($help);
  return $output;
}