From 5e015d39c4d520b713c8745cefd75208d09e44ad Mon Sep 17 00:00:00 2001
From: Sachin Shirke <sachin.shirke2006@gmail.com>
Date: Tue, 3 Jun 2014 16:37:48 +0530
Subject: [PATCH] Moved hook_help() from the Help module to the System module 
 and updated its documentation.

---
 core/modules/help/help.api.php     | 30 --------------------------
 core/modules/system/system.api.php | 43 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+), 30 deletions(-)

diff --git a/core/modules/help/help.api.php b/core/modules/help/help.api.php
index ede6b4c..2e18210 100644
--- a/core/modules/help/help.api.php
+++ b/core/modules/help/help.api.php
@@ -10,37 +10,7 @@
  * @{
  */
 
-/**
- * Provide online user help.
- *
- * By implementing hook_help(), a module can make documentation available to
- * the user for the module as a whole, or for specific paths.  Help for
- * developers should usually be provided via function header comments in the
- * code, or in special API example files.
- *
- * For a detailed usage example, see page_example.module.
- *
- * @param string $route_name
- *   For a specific page, use the route name as identified in the module's
- *   routing.yml file. For the help overview page, the route name will be in the
- *   form of "help.page.$modulename".
- * @param \Symfony\Component\HttpFoundation\Request $request
- *   The current request.
- *
- * @return string
- *   A localized string containing the help text.
- */
-function hook_help($route_name, \Symfony\Component\HttpFoundation\Request $request) {
-  switch ($route_name) {
-    // Main module help for the block module.
-    case 'help.page.block':
-      return '<p>' . t('Blocks are boxes of content rendered into an area, or region, of a web page. The default theme Bartik, for example, implements the regions "Sidebar first", "Sidebar second", "Featured", "Content", "Header", "Footer", etc., and a block may appear in any one of these areas. The <a href="@blocks">blocks administration page</a> provides a drag-and-drop interface for assigning a block to a region, and for controlling the order of blocks within regions.', array('@blocks' => url('admin/structure/block'))) . '</p>';
 
-    // Help for another path in the block module.
-    case 'block.admin_display':
-      return '<p>' . t('This page provides a drag-and-drop interface for assigning a block to a region, and for controlling the order of blocks within regions. Since not all themes implement the same regions, or display regions in the same way, blocks are positioned on a per-theme basis. Remember that your changes will not be saved until you click the <em>Save blocks</em> button at the bottom of the page.') . '</p>';
-  }
-}
 
 /**
  * @} End of "addtogroup hooks".
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index c7c8a49..008c6d7 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -980,6 +980,49 @@ function hook_permission() {
 }
 
 /**
+ * Provide online user help.
+ *
+ * By implementing hook_help(), a module can make documentation available to
+ * the user for the module as a whole, or for specific routes. Help for
+ * developers should usually be provided via function header comments in the
+ * code, or in special API example files.
+ *
+ * The page-specific help information provided by this hook appears as a system
+ * help block on that page. The module overview help information is displayed 
+ * by the Help module. It can be accessed from the page at admin/help or from
+ * the Extend page.
+ * 
+ * For the detailed usage examples of:
+ * - The module overview help, see content_translation.module. The module
+ *   overview help should follow a certain standard structure.
+ *   @see https://drupal.org/node/632280
+ * - The page-specific help using only routes, see book.module.
+ * - The page-specific help using routes and $request, see block.module.
+ *
+ * @param string $route_name
+ *   For the page-specific help, use the route name as identified in the
+ *   module's routing.yml file. For the module overview help, the route name
+ *   will be in the form of "help.page.$modulename".
+ * @param \Symfony\Component\HttpFoundation\Request $request
+ *   The current request. This can be used to generate a customized
+ *   page-specific help information.
+ *
+ * @return string
+ *   A localized string containing the help text.
+ */
+function hook_help($route_name, \Symfony\Component\HttpFoundation\Request $request) {
+  switch ($route_name) {
+    // Main module help for the block module.
+    case 'help.page.block':
+      return '<p>' . t('Blocks are boxes of content rendered into an area, or region, of a web page. The default theme Bartik, for example, implements the regions "Sidebar first", "Sidebar second", "Featured", "Content", "Header", "Footer", etc., and a block may appear in any one of these areas. The <a href="@blocks">blocks administration page</a> provides a drag-and-drop interface for assigning a block to a region, and for controlling the order of blocks within regions.', array('@blocks' => url('admin/structure/block'))) . '</p>';
+
+    // Help for another path in the block module.
+    case 'block.admin_display':
+      return '<p>' . t('This page provides a drag-and-drop interface for assigning a block to a region, and for controlling the order of blocks within regions. Since not all themes implement the same regions, or display regions in the same way, blocks are positioned on a per-theme basis. Remember that your changes will not be saved until you click the <em>Save blocks</em> button at the bottom of the page.') . '</p>';
+  }
+}
+
+/**
  * Register a module or theme's theme implementations.
  *
  * The implementations declared by this hook have several purposes:
-- 
1.8.4.msysgit.0

