You are here

function fillpdf_help in FillPDF 8.4

Same name and namespace in other branches
  1. 5 fillpdf.module \fillpdf_help()
  2. 6 fillpdf.module \fillpdf_help()
  3. 7.2 fillpdf.module \fillpdf_help()
  4. 7 fillpdf.module \fillpdf_help()
  5. 5.0.x fillpdf.module \fillpdf_help()

Implements hook_help().

File

./fillpdf.module, line 14
Allows mappings of PDFs to site content.

Code

function fillpdf_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    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' => Url::fromUri('https://www.drupal.org/docs/8/modules/fillpdf')
          ->toString(),
      ]);
      return $content;
    case 'fillpdf.forms_admin':
      if (\Drupal::moduleHandler()
        ->moduleExists('help')) {
        return t('See the <a href=":link">documentation</a> for an explanation on dowloading these forms to PDF', [
          ':link' => Url::fromUri('https://www.drupal.org/docs/8/modules/fillpdf')
            ->toString(),
        ]);
      }
      else {
        return t('Activate the help module if you need an explanation on downloading these forms to PDF.');
      }
      break;
  }
  return '';
}