- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowiki::Mode
::xowiki::Mode create ...Mode handler to set for the current session some application specific mode (like e.g. admin-mode, developer-mode, student-mode, training-mode, ...) Interface: - method get: obtain the current value (maybe default) - method set: force the mode to the provided value - method toggle: toggle current value
Defined in packages/xowiki/tcl/xowiki-mode-procs.tcl
Class Relations
::nx::Class create ::xowiki::Mode \ -superclass ::nx::ObjectMethods (to be applied on instances)
get (scripted, public)
<instance of xowiki::Mode> getGet the current mode, which might be set by the user or which might be obtained from the default method.
- Testcases:
- No testcase defined.
set default [:default] set mode_name [:mode_name] if {![ns_conn isconnected]} { return $default } if {[ad_get_client_property -cache_only t xowiki $mode_name] eq ""} { ad_set_client_property -persistent f xowiki $mode_name $default } return [ad_get_client_property -cache_only t xowiki $mode_name]set (scripted, public)
<instance of xowiki::Mode> set valueSet the mode to the specified value
- Parameters:
- value (required, boolean)
- Testcases:
- No testcase defined.
set mode_name [:mode_name] ad_set_client_property -persistent f xowiki $mode_name $valuetoggle (scripted, public)
<instance of xowiki::Mode> toggleSwitch state of the toggle
- Testcases:
- No testcase defined.
set oldState [:get] :set [expr {!$oldState}]
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables