From 04acfcbc984f917dcd31f113b893b5e76d4227f3 Mon Sep 17 00:00:00 2001 From: meysamzandy <zandy.meysam@gmail.com> Date: Sun, 23 Feb 2020 23:48:10 +0330 Subject: [PATCH] add Implements hook_help() in clean_node_api.module --- clean_node_api/clean_node_api.module | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/clean_node_api/clean_node_api.module b/clean_node_api/clean_node_api.module index fca6766..84a35a2 100644 --- a/clean_node_api/clean_node_api.module +++ b/clean_node_api/clean_node_api.module @@ -2,4 +2,27 @@ /** * @file ++ * Clean restful api. */ + +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + * + * @param $route_name + * @param \Drupal\Core\Routing\RouteMatchInterface $route_match + * + * @return string + * Return in string + */ +function clean_node_api_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the ctc module. + case 'help.page.clean_node_api': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('Clean RESTful Web Services API is just alternative for default drupal APIs that is not clean.') . '</p>'; + return $output; + } +} -- GitLab