function data_policy_help in Data Policy 8
Implements hook_help().
File
- ./
data_policy.module, line 17 - data_policy.module
Code
function data_policy_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the data_policy module.
case 'help.page.data_policy':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('This module helps site managers inform users about data collection.') . '</p>';
return $output;
case 'entity.block.edit_form':
if ($route_match
->getRawParameter('block') != 'data_policy') {
break;
}
$url = Link::createFromRoute(t('Data usage explanation'), 'entity.informblock.collection');
return '<p>' . t('Go to @url page for setting block title on specific pages.', [
'@url' => $url
->toString(),
]) . '</p>';
}
}