Commit f82227cb authored by Alona O'neill's avatar Alona O'neill Committed by Stijn Blomme
Browse files

Issue #3063155 by alonaoneill, Willtg: Hook Help is missing

parent ef010c27
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
<?php
use Drupal\Core\Routing\RouteMatchInterface;

/**
 * @file
@@ -52,3 +53,28 @@ function mailer_theme($existing, $type, $theme, $path) {

  return $theme;
}

/**
 * Implements hook_help().
 */
function mailer_help($route_name, RouteMatchInterface $arg) {
  switch ($route_name) {
    case 'help.page.mailer':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('This module provides a new plugin type to define coded emails throughout your website.
        This is a developer module, the provided UI is minimal.') . '</p>';
      $output .= '<h3>' . t('Usage') . '</h3>';
      $output .= '<ul>';
      $output .= '<li>' . t('When creating a site that sends a lot of mails your code gets sloppy fast.') . '</li>';
      $output .= '<li>' . t('Each mail needs a hook_email, hook_template, a calling function, ...') . '</li>';
      $output .= '<li>' . t('This module makes it possible to bundle all the mail data into a single mailer plugin and call the plugin from everywhere on your website.') . '</li>';
      $output .= '</ul>';
      $output .= t('Visit the <a href=":project_link">Mailer project pages</a> on Drupal.org for more information.',[
        ':project_link' => 'https://www.drupal.org/project/mailer'
        ]);
      $output .= '</p>';

      return $output;
  }
}