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:
- Options:
- -name (required)
- -description (optional)
- -categories (required)
- -locale (optional)
- -user_id (optional)
- -creation_ip (optional)
- -context_id (optional)
- -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):
- Testcases:
- category_tree_import