(no commit message)
[openafs-wiki.git] / TWiki / TWikiUIDotPm.mdwn
1 # <a name="Package &lt;code&gt;TWiki::UI="></a> Package =TWiki::UI
2
3 Service functions used by the UI packages
4
5 <div>
6   <ul>
7     <li><a href="#Package =TWiki::UI="> Package TWiki::UI</a><ul>
8         <li><a href="#StaticMethod <strong>run</strong> (\method,...)"> StaticMethod run <tt>(\&amp;method,...)</tt></a></li>
9         <li><a href="#StaticMethod <strong>check_WebExists</strong> ("> StaticMethod checkWebExists <tt>($session,$web,$topic,$op)</tt></a></li>
10         <li><a href="#StaticMethod <strong>topicExists</strong> ($ses"> StaticMethod topicExists <tt>($session,$web,$topic,$op)=&gt;boolean</tt></a></li>
11         <li><a href="#StaticMethod <strong>checkMirror</strong> ($ses"> StaticMethod checkMirror <tt>($session,$web,$topic)</tt></a></li>
12         <li><a href="#StaticMethod <strong>checkAccess</strong> ($web"> StaticMethod checkAccess <tt>($web,$topic,$mode,$user)</tt></a></li>
13         <li><a href="#StaticMethod *read_TemplateTopic"> StaticMethod readTemplateTopic <tt>($session,$theTopicName) -&gt; ($meta,$text)</tt></a></li>
14       </ul>
15     </li>
16   </ul>
17 </div>
18
19 ## <a name="StaticMethod &lt;strong&gt;run&lt;/strong&gt; (\method,...)"></a> [[StaticMethod]] **run** `(\&method,...)`
20
21 Entry point for execution of a UI function. The parameter is a reference to the method.
22
23 ... is a list of name-value pairs that define initial context identifiers that must be set during initPlugin. This set will be extended to include command\_line if the script is detected as being run outside the browser.
24
25 ## <a name="StaticMethod &lt;strong&gt;check_WebExists&lt;/strong&gt; ("></a> [[StaticMethod]] **checkWebExists** `($session,$web,$topic,$op)`
26
27 Check if the web exists. If it doesn't, will throw an oops exception. $op is the user operation being performed.
28
29 ## <a name="StaticMethod &lt;strong&gt;topicExists&lt;/strong&gt; ($ses"></a> [[StaticMethod]] **topicExists** `($session,$web,$topic,$op)=>boolean`
30
31 Check if the given topic exists, throwing an [[OopsException]] if it doesn't. $op is the user operation being performed.
32
33 ## <a name="StaticMethod &lt;strong&gt;checkMirror&lt;/strong&gt; ($ses"></a> [[StaticMethod]] **checkMirror** `($session,$web,$topic)`
34
35 Checks if this web is a mirror web, throwing an [[OopsException]] if it is.
36
37 ## <a name="StaticMethod &lt;strong&gt;checkAccess&lt;/strong&gt; ($web"></a> [[StaticMethod]] **checkAccess** `($web,$topic,$mode,$user)`
38
39 Check if the given mode of access by the given user to the given web.topic is permissible, throwing a TWiki::OopsException if not.
40
41 ## <a name="StaticMethod &lt;strong&gt;read_TemplateTopic"></a> [[StaticMethod]] \*readTemplateTopic `($session,$theTopicName) -> ($meta,$text)`
42
43 Read a topic from the TWiki web, or if that fails from the current web.