Skip to content
Snippets Groups Projects
Commit 54d38d58 authored by git's avatar git Committed by Kevin Kaland
Browse files

Issue #2854452 by Znak: No correct hook_help() function

parent 0a924414
No related branches found
No related tags found
No related merge requests found
...@@ -5,18 +5,26 @@ ...@@ -5,18 +5,26 @@
* Allows mappings of PDFs to site content. * Allows mappings of PDFs to site content.
*/ */
use Drupal\Core\Routing\RouteMatchInterface;
/** /**
* Implements hook_help(). * Implements hook_help().
*/ */
function fillpdf_help($path, $arg) { function fillpdf_help($route_name, RouteMatchInterface $route_match) {
switch ($path) { switch ($route_name) {
case 'admin/help#fillpdf': case 'help.page.fillpdf':
$content = t('See the <a href="!documentation">documentation on drupal.org</a> for a full description of and guide to this module.', ['!documentation' => \Drupal\Core\Url::fromUri('http://drupal.org/documentation/modules/fillpdf')]); $content = t('See the <a href=":documentation">documentation on drupal.org</a> for a full description of and guide to this module.', [
':documentation' => \Drupal\Core\Url::fromUri('https://www.drupal.org/docs/8/modules/fillpdf')
->toString(),
]);
return $content; return $content;
case 'admin/structure/fillpdf': case 'fillpdf.forms_admin':
if (\Drupal::moduleHandler()->moduleExists('help')) { if (\Drupal::moduleHandler()->moduleExists('help')) {
return t('See the !link for an explanation on dowloading these forms to PDF', return t('See the <a href=":link">documentation</a> for an explanation on dowloading these forms to PDF',
['!link' => \Drupal::l(t('documentation'), \Drupal\Core\Url::fromUri('http://drupal.org/documentation/modules/fillpdf'))]); [
':link' => \Drupal\Core\Url::fromUri('https://www.drupal.org/docs/8/modules/fillpdf')
->toString(),
]);
} }
else { else {
return t('Activate the help module if you need an explanation on downloading these forms to PDF.'); return t('Activate the help module if you need an explanation on downloading these forms to PDF.');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment