From 8e27ec089be8543edab5b0bed210ebc4c79685e4 Mon Sep 17 00:00:00 2001 From: DDEV User <nobody@example.com> Date: Mon, 14 Aug 2023 08:30:56 +0000 Subject: [PATCH] Issue #3335159 by Jay Jangid: hook_help function missing in .module file --- term_glossary.module | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/term_glossary.module b/term_glossary.module index d4506ed..7dcaf81 100644 --- a/term_glossary.module +++ b/term_glossary.module @@ -10,6 +10,25 @@ use Drupal\Core\Field\FieldDefinitionInterface; use Drupal\Core\Field\FormatterInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\taxonomy\Entity\Vocabulary; +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function term_glossary_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the term_glossary module. + case 'help.page.term_glossary': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('This flexible module uses a vocabulary (taxonomy) as a glossary. + It auto scans the fields (you configure it to) for uses of taxonomy terms + defined in your vocabulary.') . '</p>'; + return $output; + + default: + } +} /** * Implements hook_theme(). -- GitLab