xotcl.wu-wien.ac.at
Begin main content
Methods: Source: Variables:
[All Methods | Documented Methods | Hide Methods] [Display Source | Hide Source] [Show Variables | Hide Variables]

::xotcl::Class[i] ::xowiki::Category

Class Hierarchy of ::xowiki::Category

  • ::xotcl::Object[i]
    Meta-class:
    ::xotcl::Class[i]
    Methods for instances:
    __api_make_doc, __api_make_forward_doc, __timediff, abstract, ad_doc, ad_forward, ad_proc, appendC, arrayC, asHTML, autonameC, check, classC, cleanupC, configureC, containsC, copyC, db_0or1rowC, db_1rowC, debug, defaultmethodC, destroyC, destroy_on_cleanup, ds, evalC, existsC, extractConfigureArg, filterC, filterguardC, filtersearch, forward, hasclass, incrC, infoC, init, instvarC, invarC, isclass, ismetaclass, ismixin, isobject, istype, lappendC, log, method, mixinC, mixinguardC, moveC, msg, noinitC, objectparameter, parametercmdC, proc, procsearch, qn, requireNamespaceC, residualargsC, self, serialize, setC, set_instance_vars_defaults, show-object, substC, traceC, unknown, unsetC, uplevelC, upvarC, volatileC, vwait
    Methods to be applied on the class (in addition to the methods provided by the meta-class):
    getExitHandler, setExitHandler, unsetExitHandler
    • ::xowiki::Category[i]
      Meta-class:
      ::xotcl::Class[i]
      Methods to be applied on the class (in addition to the methods provided by the meta-class):
      get_category_infos, get_mapped_trees

Class Relations

  • superclass: ::xotcl::Object[i]
::xotcl::Class create ::xowiki::Category \
     -superclass ::xotcl::Object

Methods

  • proc get_category_infos

    ::1762196 proc get_category_infos {{-all false} {-subtree_id ""} {-locale ""} -tree_id} {
        #
        # provide a common interface to older versions of categories
        #
        # provide compatibility with earlier versions of categories
        #set have_locale [expr {[lsearch [info args category_tree::get_tree] locale] > -1}]
        set have_locale 1
        set all_arg [expr {$all ? "-all" : ""}]
        return [expr {$have_locale ?
                      [eval category_tree::get_tree $all_arg -subtree_id [list $subtree_id] $tree_id $locale] :
                      [eval category_tree::get_tree $all_arg -subtree_id [list $subtree_id] $tree_id]}]
      }
    
  • proc get_mapped_trees

    ::1762196 proc get_mapped_trees {-object_id {-locale ""} {-names ""} {-output {tree_id tree_name subtree_category_id assign_single_p require_category_p}}} {
        # Return matched category trees matching the specified names (or all)
    
        # provide compatibility with earlier versions of categories
        set have_locale [expr {[lsearch [info args category_tree::get_mapped_trees] locale] > -1}]
        set mapped_trees [expr {$have_locale ?
                                [category_tree::get_mapped_trees $object_id $locale] :
                                [category_tree::get_mapped_trees $object_id]}]
        set trees [list]
        foreach tree $mapped_trees {
          foreach {tree_id my_tree_name ...} $tree {break}
    
          # "names" is a list of category names
          if {$names ne ""} {
            # Check, if the current name matches any of the given
            # names. If the name contains wild-cards, perform a string
            # match, otherwise a string equal.
            set match 0
            foreach n $names {
              if {[string first * $n] > -1} {
                if {![string match $n $my_tree_name]} {
                  set match 1
                  break
                }
              } elseif {$n eq $my_tree_name} {
                set match 1
                break
              }
            }
            if {!$match} continue
          }
          # Get the values from info in "tree" into separate variables given by output.
          # Note, that the order matters!
          foreach $output $tree break
          set l [list]
          foreach __var $output {lappend l [set $__var]}
          lappend trees $l
        }
        return $trees
      }
    

Variables

::xowiki::Category set __default_metaclass ::xotcl::Class
::xowiki::Category set __default_superclass ::xotcl::Object

Methods: Source: Variables:
[All Methods | Documented Methods | Hide Methods] [Display Source | Hide Source] [Show Variables | Hide Variables]