category_tree::import (public)

 category_tree::import -name name [ -description description ] \
    -categories categories [ -locale locale ] [ -user_id user_id ] \
    [ -creation_ip creation_ip ] [ -context_id context_id ]

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

Insert a new category tree with categories. Here is an example of how to use this in tcl:

    set tree_id [category_tree::import -name regions -description {regions and states} -categories {
    1 europe
    2 germany
    2 {united kingdom}
    2 france
    1 asia
    2 china
    1 {north america}
    2 {united states}
    }]
    

Switches:
-name (required)
-description (optional)
-categories (required)
-locale (optional)
-user_id (optional)
-creation_ip (optional)
-context_id (optional)
Options:
-name
tree name.
-description
tree description.
-categories
Tcl list of levels and category_names.
-locale
locale of the language. [ad_conn locale] used by default.
-user_id
user that adds the category tree. [ad_conn user_id] used by default.
-creation_ip
ip-address of the user that adds the category tree. [ad_conn peeraddr] used by default.
-context_id
context_id of the category tree. [ad_conn package_id] used by default.
Returns:
tree_id
Authors:
Jeff Davis
Timo Hentschel <timo@timohentschel.de>

Partial Call Graph (max 5 caller/called nodes):
%3 test_category_tree_import category_tree_import (test categories) category_tree::import category_tree::import test_category_tree_import->category_tree::import ad_conn ad_conn (public) category_tree::import->ad_conn category::add category::add (public) category_tree::import->category::add category_tree::add category_tree::add (public) category_tree::import->category_tree::add category_tree::flush_cache category_tree::flush_cache (public) category_tree::import->category_tree::flush_cache db_transaction db_transaction (public) category_tree::import->db_transaction

Testcases:
category_tree_import
[ show source ]
Show another procedure: