From c14d24eb715237a60cd244f023e93a9fb569a6f5 Mon Sep 17 00:00:00 2001 From: Jay Jangid <61875-Jay-Jangid@users.noreply.drupalcode.org> Date: Tue, 7 Feb 2023 12:52:40 +0530 Subject: [PATCH] Issue #3339837: Implement hook_help() --- preview.module | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/preview.module b/preview.module index 63eaddf..118920a 100644 --- a/preview.module +++ b/preview.module @@ -6,6 +6,25 @@ */ use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function all_entity_preview_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the all_entity_preview module. + case 'help.page.all_entity_preview': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('This module allows to set an optional preview on any + content entity type and bundle as its currently implemented for nodes. The + code is based on the one in the core Node module.') . '</p>'; + return $output; + + default: + } +} /** * Implements hook_page_top(). */ -- GitLab