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 ... 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.
25 ## <a name="StaticMethod <strong>check_WebExists</strong> ("></a> [[StaticMethod]] **checkWebExists** `($session,$web,$topic,$op)`
27 Check if the web exists. If it doesn't, will throw an oops exception. $op is the user operation being performed.
29 ## <a name="StaticMethod <strong>topicExists</strong> ($ses"></a> [[StaticMethod]] **topicExists** `($session,$web,$topic,$op)=>boolean`
31 Check if the given topic exists, throwing an [[OopsException]] if it doesn't. $op is the user operation being performed.
33 ## <a name="StaticMethod <strong>checkMirror</strong> ($ses"></a> [[StaticMethod]] **checkMirror** `($session,$web,$topic)`
35 Checks if this web is a mirror web, throwing an [[OopsException]] if it is.
37 ## <a name="StaticMethod <strong>checkAccess</strong> ($web"></a> [[StaticMethod]] **checkAccess** `($web,$topic,$mode,$user)`
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.
41 ## <a name="StaticMethod <strong>read_TemplateTopic"></a> [[StaticMethod]] \*readTemplateTopic `($session,$theTopicName) -> ($meta,$text)`
43 Read a topic from the TWiki web, or if that fails from the current web.