category::add (public)

 category::add [ -category_id category_id ] -tree_id tree_id \
    -parent_id parent_id -name name [ -locale locale ] \
    [ -description description ] [ -deprecated_p deprecated_p ] \
    [ -user_id user_id ] [ -creation_ip creation_ip ] [ -noflush ]

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

Insert a new category. The same translation will be added in the default language if it's in a different language.

Switches:
-category_id
(optional)
-tree_id
(required)
-parent_id
(required)
-name
(required)
-locale
(optional)
-description
(optional)
-deprecated_p
(defaults to "f") (optional)
-user_id
(optional)
-creation_ip
(optional)
-noflush
(boolean) (optional)
Options:
-category_id
category_id of the category to be inserted.
-locale
locale of the language. [ad_conn locale] used by default.
-name
category name.
-description
description of the category.
-deprecated_p
is category deprecated?
-tree_id
tree_id of the category the category should be added.
-parent_id
id of the parent category. "" if top level category.
-user_id
user that adds the category. [ad_conn user_id] used by default.
-creation_ip
ip-address of the user that adds the category. [ad_conn peeraddr] used by default.
-noflush
defer calling category_tree::flush_cache (which if adding multiple categories to a large tree can be very expensive). note that if you set this flag you must call category_tree::flush_cache once the adds are complete.
Returns:
category_id
Author:
Timo Hentschel <timo@timohentschel.de>

Partial Call Graph (max 5 caller/called nodes):
%3 test_category_crud category_crud (test categories) category::add category::add test_category_crud->category::add test_category_get_procs category_get_procs (test categories) test_category_get_procs->category::add test_category_link category_link (test categories) test_category_link->category::add test_category_synonyms category_synonyms (test categories) test_category_synonyms->category::add test_category_tree_procs category_tree_procs (test categories) test_category_tree_procs->category::add ad_conn ad_conn (public) category::add->ad_conn category_tree::flush_cache category_tree::flush_cache (public) category::add->category_tree::flush_cache db_exec_plsql db_exec_plsql (public) category::add->db_exec_plsql db_transaction db_transaction (public) category::add->db_transaction parameter::get parameter::get (public) category::add->parameter::get category_tree::import category_tree::import (public) category_tree::import->category::add category_tree::xml::add_category category_tree::xml::add_category (private) category_tree::xml::add_category->category::add packages/categories/www/cadmin/category-form.tcl packages/categories/ www/cadmin/category-form.tcl packages/categories/www/cadmin/category-form.tcl->category::add

Testcases:
category_synonyms, category_link, category_crud, category_get_procs, category_tree_procs
[ show source ]
Show another procedure: