-
Notifications
You must be signed in to change notification settings - Fork 1
/
witai.module
55 lines (50 loc) · 1.69 KB
/
witai.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/**
* @file
* Module file for witai_module.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* @defgroup witai Example: Page
* @ingroup examples
* @{
* This example demonstrates how a module can display a page at a given URL.
*
* It's important to understand how the menu system works in order to
* implement your own pages. See the Menu Example module for some insight.
*
* @see menu_example
*/
/**
* Implements hook_help().
*
* Through hook_help(), a module can make documentation available to the user
* for the module as a whole or for specific routes. Where the help appears
* depends on the $route_name specified.
*
* Help text will be displayed in the region designated for help text. Typically
* this is the 'Help' region which can be found at admin/structure/block.
*
* The help text in the first example below, will appear on the simple page at
* examples/witai/simple.
*
* The second example text will be available on the admin help page (admin/help)
* in the list of help topics using the name of the module. To specify help in
* the admin section combine the special route name of 'help.page' with the
* module's machine name, as in 'help.page.witai' below.
*
* @see hook_help()
*/
function witai_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'witai_simple':
// Help text for the simple page registered for this path.
return t('This is help text for the simple page.');
case 'help.page.witai':
// Help text for the admin section, using the module name in the path.
return t("This is help text created in page example's implementation of hook_help().");
}
}
/**
* @} End of "defgroup witai".
*/