function legal_help in Legal 2.0.x
Same name and namespace in other branches
- 8 legal.module \legal_help()
- 5 legal.module \legal_help()
- 6.8 legal.module \legal_help()
- 6.7 legal.module \legal_help()
- 7.2 legal.module \legal_help()
- 7 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;
}