Skip to content
Snippets Groups Projects

Issue #3335623: hook_help function missing in .module file

4 unresolved threads

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
12 * Implements hook_help().
13 */
14 function codesnippet_help($route_name, RouteMatchInterface $route_match) {
15 switch ($route_name) {
16 // Main module help for the codesnippet module.
17 case 'help.page.codesnippet':
18 $output = '';
19 $output .= '<h3>' . t('About') . '</h3>';
20 $output .= '<p>' . t('This module enables the CodeSnippet plugin from CKEditor.com in your WYSIWYG.
21 It includes the highlightjs library and all available styles for it. If you have ever wanted to
22 drop code examples in your Drupal content and have it highlighted in a pretty format, this is
23 for you. This project is available for Drupal 7 as WYSIWYG CodeSnippet. Since that project
24 relies on WYSIWYG module, and this one only requires D8 core, it made sense to rename it.') . '</p>';
25 return $output;
26
27 default:
  • 9 use Drupal\Core\Routing\RouteMatchInterface;
    9 10
    11 /**
    12 * Implements hook_help().
    13 */
    14 function codesnippet_help($route_name, RouteMatchInterface $route_match) {
    15 switch ($route_name) {
    16 // Main module help for the codesnippet module.
    17 case 'help.page.codesnippet':
    18 $output = '';
    19 $output .= '<h3>' . t('About') . '</h3>';
    20 $output .= '<p>' . t('This module enables the CodeSnippet plugin from CKEditor.com in your WYSIWYG.
    21 It includes the highlightjs library and all available styles for it. If you have ever wanted to
    22 drop code examples in your Drupal content and have it highlighted in a pretty format, this is
    23 for you. This project is available for Drupal 7 as WYSIWYG CodeSnippet. Since that project
    24 relies on WYSIWYG module, and this one only requires D8 core, it made sense to rename it.') . '</p>';
    • I am not sure the note about renaming the module is relevant for using the module.

      Actually, not even the part about the Drupal 7 module seems relevant, for a site running of Drupal 8 or higher versions.

    • Please register or sign in to reply
  • 6 6 */
    7 7
    8 8 use Drupal\editor\Entity\Editor;
    9 use Drupal\Core\Routing\RouteMatchInterface;
    9 10
    11 /**
    12 * Implements hook_help().
    13 */
    14 function codesnippet_help($route_name, RouteMatchInterface $route_match) {
    15 switch ($route_name) {
    16 // Main module help for the codesnippet module.
    17 case 'help.page.codesnippet':
    18 $output = '';
    19 $output .= '<h3>' . t('About') . '</h3>';
    20 $output .= '<p>' . t('This module enables the CodeSnippet plugin from CKEditor.com in your WYSIWYG.
    21 It includes the highlightjs library and all available styles for it. If you have ever wanted to
  • 8 8 use Drupal\editor\Entity\Editor;
    9 use Drupal\Core\Routing\RouteMatchInterface;
    9 10
    11 /**
    12 * Implements hook_help().
    13 */
    14 function codesnippet_help($route_name, RouteMatchInterface $route_match) {
    15 switch ($route_name) {
    16 // Main module help for the codesnippet module.
    17 case 'help.page.codesnippet':
    18 $output = '';
    19 $output .= '<h3>' . t('About') . '</h3>';
    20 $output .= '<p>' . t('This module enables the CodeSnippet plugin from CKEditor.com in your WYSIWYG.
    21 It includes the highlightjs library and all available styles for it. If you have ever wanted to
    22 drop code examples in your Drupal content and have it highlighted in a pretty format, this is
    23 for you. This project is available for Drupal 7 as WYSIWYG CodeSnippet. Since that project
    Please register or sign in to reply
    Loading