You are here

fillpdf.module in FillPDF 8.4

Allows mappings of PDFs to site content.

File

fillpdf.module
View source
<?php

/**
 * @file
 * Allows mappings of PDFs to site content.
 */
use Drupal\Core\Url;
use Drupal\Core\Routing\RouteMatchInterface;

/**
 * Implements hook_help().
 */
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 '';
}

Functions

Namesort descending Description
fillpdf_help Implements hook_help().