Debian Codegraph @

docs/devel/mod_help.htm

raw symbols SCIP
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html lang="en">
3 <head>
4 <title>Module HowTo - Help entries</title>
5 <link rel="stylesheet" type="text/css" href="style/layout.css">
6 <link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico">
7 </head>
8 <body>
9 <div style="text-align: center;">
10 <h1>Module HowTo - Help entries<br>
11 </h1>
12 <br>
13 <br>
14 <div style="text-align: left;"><br>
15 <h2>1. Defining help entries<br>
16 </h2>
17 Your module should provide help for all input fields and other
18 important things.<br>
19 The LAM help system defines an extra ID range for each module. So you
20 are free in defining your own IDs.<br>
21 <br>
22 The help entries are specified with <span style="font-weight: bold;">get_help()</span>
23 or <span style="font-weight: bold;">meta['help']</span>.<br>
24 <br>
25 <span style="font-weight: bold; text-decoration: underline;">Example:</span><br
26 style="font-weight: bold; text-decoration: underline;">
27 <br>
28 The <span style="font-style: italic;">ieee802Device</span>
29 module needs help entries for the MAC address.<br>
30 <br>
31 <div class="mod-code">
32 &nbsp;&nbsp;&nbsp; * Returns meta data that is interpreted by parent
33 class<br>
34 &nbsp;&nbsp;&nbsp; *<br>
35 &nbsp;&nbsp;&nbsp; * @return array array with meta data<br>
36 &nbsp;&nbsp;&nbsp; */<br>
37 &nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">function</span>
38 get_metaData() {<br>
39 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; $return = array();<br>
40 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;
41 &nbsp;&nbsp;&nbsp;&nbsp; // help Entries</span><br
42 style="color: rgb(255, 0, 0);">
43 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;
44 &nbsp;&nbsp; &nbsp;$return['help'] = array(</span><br
45 style="color: rgb(255, 0, 0);">
46 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;
47 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'mac' =&gt; array(</span><br
48 style="color: rgb(255, 0, 0);">
49 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;
50 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"Headline"
51 =&gt; _("MAC address"),</span><br style="color: rgb(255, 0, 0);">
52 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;
53 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"Text" =&gt;
54 _("This is the MAC address of the network card of the device (e.g.
55 00:01:02:DE:EF:18).")</span><br style="color: rgb(255, 0, 0);">
56 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;
57 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;),</span><br
58 style="color: rgb(255, 0, 0);">
59 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;
60 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'macList' =&gt; array(</span><br
61 style="color: rgb(255, 0, 0);">
62 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;
63 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"Headline"
64 =&gt; _("MAC address list"),</span><br style="color: rgb(255, 0, 0);">
65 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;
66 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"Text" =&gt;
67 _("This is a comma separated list of MAC addresses.")</span><br
68 style="color: rgb(255, 0, 0);">
69 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;
70 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;));</span><br
71 style="color: rgb(255, 0, 0);">
72 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return $return;<br>
73 &nbsp;&nbsp;&nbsp; }<br>
74 </div>
75 <br>
76 <br>
77 </div>
78 </div>
79 </body>
80 </html>