Debian Codegraph @

docs/devel/tools.htm

raw symbols SCIP
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html lang="en"><head>
3
4
5
6 <meta content="text/html; charset=ISO-8859-15" http-equiv="content-type"><title>Tools</title>
7
8 <link rel="stylesheet" type="text/css" href="style/layout.css">
9 <link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico"></head><body>
10 <h1 style="text-align: center;">Tools<br>
11 </h1>
12
13 LAM includes a "Tools" page which contains various tools like the
14 profile editor or the file upload. The content of this page is dynamic.
15 LAM includes all *.inc files in the directory lib/tools. Each found
16 class which implements the LAMtool interface is a candidate for this
17 page. The different tools are displayed and ordered based on their
18 security level and ordering preferences.<br>
19 <br>
20 <span style="font-weight: bold;">Example:</span><br>
21 <br>
22 The profile editor implements the LAMtool interface.<br>
23 <br>
24
25 <div class="mod-code">
26 &nbsp;* Profile editor<br>
27 &nbsp;* <br>
28 &nbsp;* @package tools<br>
29 &nbsp;*/ <br>
30 class <span style="font-weight: bold;">toolProfileEditor</span> implements <span style="font-weight: bold;">LAMTool</span> {<br>
31 &nbsp;&nbsp;&nbsp; <br>
32 &nbsp;&nbsp;&nbsp; /**<br>
33 &nbsp;&nbsp;&nbsp; &nbsp;* Returns the name of the tool.<br>
34 &nbsp;&nbsp;&nbsp; &nbsp;* <br>
35 &nbsp;&nbsp;&nbsp; &nbsp;* @return string name<br>
36 &nbsp;&nbsp;&nbsp; &nbsp;*/<br>
37 &nbsp;&nbsp;&nbsp; &nbsp;function <span style="font-weight: bold;">getName</span>() {<br>
38 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; return _("Profile editor");<br>
39 &nbsp;&nbsp;&nbsp; &nbsp;}<br>
40 &nbsp;&nbsp;&nbsp; <br>
41 &nbsp;&nbsp;&nbsp; /**<br>
42 &nbsp;&nbsp;&nbsp; &nbsp;* returns a description text for the tool.<br>
43 &nbsp;&nbsp;&nbsp; &nbsp;* <br>
44 &nbsp;&nbsp;&nbsp; &nbsp;* @return string description<br>
45 &nbsp;&nbsp;&nbsp; &nbsp;*/<br>
46 &nbsp;&nbsp;&nbsp; function <span style="font-weight: bold;">getDescription</span>() {<br>
47 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return _("Here you can manage your account profiles.");<br>
48 &nbsp;&nbsp;&nbsp; }<br>
49 &nbsp;&nbsp;&nbsp; <br>
50 &nbsp;&nbsp;&nbsp; /**<br>
51 &nbsp;&nbsp;&nbsp; &nbsp;* Returns a link to the tool page (relative to templates/).<br>
52 &nbsp;&nbsp;&nbsp; &nbsp;* <br>
53 &nbsp;&nbsp;&nbsp; &nbsp;* @return string link<br>
54 &nbsp;&nbsp;&nbsp; &nbsp;*/<br>
55 &nbsp;&nbsp;&nbsp; function <span style="font-weight: bold;">getLink</span>() {<br>
56 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return "profedit/profilemain.php";<br>
57 &nbsp;&nbsp;&nbsp; }<br>
58 &nbsp;&nbsp;&nbsp; <br>
59 &nbsp;&nbsp;&nbsp; /** <br>
60 &nbsp;&nbsp;&nbsp; &nbsp;* Returns if the tool requires write access to LDAP.<br>
61 &nbsp;&nbsp;&nbsp; &nbsp;* <br>
62 &nbsp;&nbsp;&nbsp; &nbsp;* @return boolean true if write access is needed<br>
63 &nbsp;&nbsp;&nbsp; &nbsp;*/<br>
64 &nbsp;&nbsp;&nbsp; function <span style="font-weight: bold;">getRequiresWriteAccess</span>() {<br>
65 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return true;<br>
66 &nbsp;&nbsp;&nbsp; }<br>
67 &nbsp;&nbsp;&nbsp; <br>
68 &nbsp;&nbsp;&nbsp; /**<br>
69 &nbsp;&nbsp;&nbsp; &nbsp;* Returns if the tool requires password change rights.<br>
70 &nbsp;&nbsp;&nbsp; &nbsp;* <br>
71 &nbsp;&nbsp;&nbsp; &nbsp;* @return boolean true if password change rights are needed<br>
72 &nbsp;&nbsp;&nbsp; &nbsp;*/<br>
73 &nbsp;&nbsp;&nbsp; function <span style="font-weight: bold;">getRequiresPasswordChangeRights</span>() {<br>
74 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return true;<br>
75 &nbsp;&nbsp;&nbsp; }<br>
76 &nbsp;&nbsp;&nbsp; <br>
77 &nbsp;&nbsp;&nbsp; /**<br>
78 &nbsp;&nbsp;&nbsp; &nbsp;* Returns the link to the tool image (relative to graphics/)<br>
79 &nbsp;&nbsp;&nbsp; &nbsp;*<br>
80 &nbsp;&nbsp;&nbsp; &nbsp;* @return string image URL<br>
81 &nbsp;&nbsp;&nbsp; &nbsp;*/<br>
82 &nbsp;&nbsp;&nbsp; function <span style="font-weight: bold;">getImageLink</span>() {<br>
83 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return 'edit.png';<br>
84 &nbsp;&nbsp;&nbsp; }<br>
85 &nbsp;&nbsp;&nbsp; <br>
86 &nbsp;&nbsp;&nbsp; /**<br>
87 &nbsp;&nbsp;&nbsp; &nbsp;* Returns the preferred position of this tool on the tools page.<br>
88 &nbsp;&nbsp;&nbsp; &nbsp;* The position may be between 0 and 1000. 0 is the top position.<br>
89 &nbsp;&nbsp;&nbsp; &nbsp;*<br>
90 &nbsp;&nbsp;&nbsp; &nbsp;* @return int preferred position<br>
91 &nbsp;&nbsp;&nbsp; &nbsp;*/<br>
92 &nbsp;&nbsp;&nbsp; function <span style="font-weight: bold;">getPosition</span>() {<br>
93 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return 100;<br>
94 &nbsp;&nbsp;&nbsp; }<br>
95 &nbsp;&nbsp;&nbsp; <br>
96 }<br>
97 </div>
98 <br>
99 <br>
100 <br>
101
102 </body></html>