1 # <a name="Package <code>TWiki::UI="></a> Package =TWiki::UI
3 Service functions used by the UI packages
7 <li><a href="#Package =TWiki::UI="> Package TWiki::UI</a><ul>
8 <li><a href="#StaticMethod <strong>run</strong> (\method)"> StaticMethod run <tt>(\&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)=>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) -> ($meta,$text)</tt></a></li>
19 ## <a name="StaticMethod <strong>run</strong> (\method)"></a> [[StaticMethod]] **run** `(\&method)`
21 Entry point for execution of a UI function. The parameter is a reference to the method.
23 ## <a name="StaticMethod <strong>check_WebExists</strong> ("></a> [[StaticMethod]] **checkWebExists** `($session,$web,$topic,$op)`
25 Check if the web exists. If it doesn't, will throw an oops exception. $op is the user operation being performed.
27 ## <a name="StaticMethod <strong>topicExists</strong> ($ses"></a> [[StaticMethod]] **topicExists** `($session,$web,$topic,$op)=>boolean`
29 Check if the given topic exists, throwing an [[OopsException]] if it doesn't. $op is the user operation being performed.
31 ## <a name="StaticMethod <strong>checkMirror</strong> ($ses"></a> [[StaticMethod]] **checkMirror** `($session,$web,$topic)`
33 Checks if this web is a mirror web, throwing an [[OopsException]] if it is.
35 ## <a name="StaticMethod <strong>checkAccess</strong> ($web"></a> [[StaticMethod]] **checkAccess** `($web,$topic,$mode,$user)`
37 Check if the given mode of access by the given user to the given web.topic is permissible, throwing a TWiki::OopsException if not.
39 ## <a name="StaticMethod <strong>read_TemplateTopic"></a> [[StaticMethod]] \*readTemplateTopic `($session,$theTopicName) -> ($meta,$text)`
41 Read a topic from the TWiki web, or if that fails from the current web.