Created on 7 August 2023, 11 months ago

Problem/Motivation

Create hook_help() for the module

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇮🇳India bhanutejaswi

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @bhanutejaswi
  • Assigned to kpoornima
  • 🇮🇳India kpoornima

    Looking on it

  • @kpoornima opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review 11 months ago
  • 🇮🇳India Shreya_98

    /**
    * Implements hook_help().
    */
    function token_help($route_name, RouteMatchInterface $route_match) {
    if ($route_name == 'help.page.token') {
    $token_tree = \Drupal::service('token.tree_builder')->buildAllRenderable([
    'click_insert' => FALSE,
    'show_restricted' => TRUE,
    'show_nested' => FALSE,
    ]);
    $output = '

    ' . t('About') . '

    ';
    $output .= '

    ' . t('The Token module provides a user interface for the site token system. It also adds some additional tokens that are used extensively during site development. Tokens are specially formatted chunks of text that serve as placeholders for a dynamically generated value. For more information, covering both the token system and the additional tools provided by the Token module, see the online documentation.', [':online' => ' https://www.drupal.org/documentation/modules/token → ', ':project' => ' https://www.drupal.org/project/token → ']) . '

    ';
    $output .= '

    ' . t('Uses') . '

    ';
    $output .= '

    ' . t('Your website uses a shared token system for exposing and using placeholder tokens and their appropriate replacement values. This allows for any module to provide placeholder tokens for strings without having to reinvent the wheel. It also ensures consistency in the syntax used for tokens, making the system as a whole easier for end users to use.') . '

    ';
    $output .= '

    ';
    return $output;
    }
    }

    Refer this code for hook_help code for your module and do changes according to your module need.

  • Status changed to Fixed 11 months ago
  • 🇮🇳India Rajan Kumar

    @kpoornima I have review & merge code in latest version.

  • Status changed to Fixed 11 months ago
Production build 0.69.0 2024