category::get_mapped_categories (public)

 category::get_mapped_categories [ -tree_id tree_id ] object_id

Defined in packages/categories/tcl/categories-procs.tcl

Gets the list of categories mapped to an object. If tree_id is provided return only the categories mapped from the given tree.

Switches:
-tree_id
(optional)
Parameters:
object_id - object of which we want to know the mapped categories.
Returns:
tcl-list of category_ids
Author:
Timo Hentschel <timo@timohentschel.de>

Partial Call Graph (max 5 caller/called nodes):
%3 test_category_object_mapping category_object_mapping (test categories) category::get_mapped_categories category::get_mapped_categories test_category_object_mapping->category::get_mapped_categories db_list db_list (public) category::get_mapped_categories->db_list Class ::xowiki::includelet::my-categories Class ::xowiki::includelet::my-categories (public) Class ::xowiki::includelet::my-categories->category::get_mapped_categories category::ad_form::fill_widgets category::ad_form::fill_widgets (public) category::ad_form::fill_widgets->category::get_mapped_categories fs::category_links fs::category_links (private) fs::category_links->category::get_mapped_categories packages/categories/lib/categorize.tcl packages/categories/ lib/categorize.tcl packages/categories/lib/categorize.tcl->category::get_mapped_categories packages/categories/www/include/widget.tcl packages/categories/ www/include/widget.tcl packages/categories/www/include/widget.tcl->category::get_mapped_categories

Testcases:
category_object_mapping
Source code:
    return [db_list get_mapped_categories {
        select category_id from category_object_map
        where object_id = :object_id
        and (:tree_id is null or category_id in (select category_id
                                                 from categories
                                                 where tree_id = :tree_id))
    }]
XQL Not present:
Generic
PostgreSQL XQL file:
packages/categories/tcl/categories-procs-postgresql.xql

Oracle XQL file:
packages/categories/tcl/categories-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: