You are here

function legal_help in Legal 8

Same name and namespace in other branches
  1. 5 legal.module \legal_help()
  2. 6.8 legal.module \legal_help()
  3. 6.7 legal.module \legal_help()
  4. 7.2 legal.module \legal_help()
  5. 7 legal.module \legal_help()
  6. 2.0.x legal.module \legal_help()

Implements hook_help().

File

./legal.module, line 26
Module file for Legal.

Code

function legal_help($route_name, RouteMatchInterface $route_match) {
  $output = '';
  switch ($route_name) {
    case 'help.page.legal':
      $output .= t('Display a Terms & Conditions statement on the registration page, require visitor to accept T&C to register. When a user creates an account they are required to accept your Terms & Conditions to complete their registration.');
      break;
    case 'legal.config_legal':
      $output .= t('Display a Terms & Conditions statement on the registration page, require visitor to accept the T&C to register. A <a href="@page">page</a> displaying your T&C will be automatically created, access to this page can be set via the <a href="@access">permissions</a> administration page.', [
        '@page' => \Drupal::urlGenerator()
          ->generate('legal.legal'),
        '@access' => \Drupal::urlGenerator()
          ->generate('user.admin_permissions'),
      ]);
  }
  return $output;
}