function printable_help in Printer and PDF versions for Drupal 8+ 2.x
Same name and namespace in other branches
- 8 printable.module \printable_help()
Implements hook_help().
File
- ./
printable.module, line 23 - Provides printer friendly content entities.
Code
function printable_help($route_name, RouteMatchInterface $route_match) {
if ($route_name !== 'help.page.printable') {
return;
}
return t('
<h3>Introduction</h3>
<p>This module allows you to generate the following printer-friendly versions of any node:<br>
<ul>
<li>Web page printer-friendly version (at www.example.com/node/nid/printable/print)</li>
<li>PDF version (at www.example.com/node/nid/printable/pdf)</li>
</ul>
where nid is the node id of content to render.)
</p>
<h3>Installation</h3>
<p>This will simplify a lot once <a href="https://www.drupal.org/project/drupal/issues/2494073">https://www.drupal.org/project/drupal/issues/2494073</a>
is fixed:<br>
<ul>
<li>Download this module either using composer or by getting it directly from drupal.org: <br>
<code>composer require drupal/printable</code>
</li>
<li>Install this module\'s composer dependencies - they can be found in composer.json in the project directory. Run composer require for each dependency from the Drupal root:<br>
<code>
composer require \'wa72/htmlpagedom\': \'1.3.*\'<br>
composer require \'smalot/pdfparser\': \'*\'<br>
</code>
</li>
<li>Enable printable:<br>
<code>drush en -y printable</code>
</li>
</ul>
</p>');
}