package_instantiate_object (public)
package_instantiate_object [ -creation_user creation_user ] \ [ -creation_ip creation_ip ] [ -package_name package_name ] \ [ -var_list var_list ] [ -extra_vars extra_vars ] \ [ -start_with start_with ] [ -form_id form_id ] \ [ -variable_prefix variable_prefix ] object_type
Defined in packages/acs-subsite/tcl/package-procs.tcl
Creates a new object of the specified type by calling the associated PL/SQL package new function.
- Switches:
- -creation_user (optional)
- The current user. Defaults to
[ad_conn user_id]
if not specified and there is a connection- -creation_ip (optional)
- The current user's IP address. Defaults to
[ad_conn peeraddr]
if not specified and there is a connection- -package_name (optional)
- The PL/SQL package associated with this object type. Defaults to
acs_object_types.package_name
- -var_list (optional)
- A list of pairs of additional attributes and their values to pass to the constructor. Each pair is a list of two elements: key => value
- -extra_vars (optional)
- an ns_set of extra vars
- -start_with (optional)
- The object type to start with when gathering attributes for this object type. Defaults to the object type.
- -form_id (optional)
- The form id from templating form system if we're using the forms API to specify attributes
- -variable_prefix (optional)
- Parameters:
- object_type (required)
- The object type of the object we are instantiating
- Returns:
- The object id of the newly created object
Example:
template::form create add_group template::element create add_group group_name -value "Publisher" set var_list [list [list context_id $context_id] [list group_id $group_id]] return [package_instantiate_object -start_with "group" -var_list $var_list -form_id "add_group" "group"]- Authors:
- Michael Bryzek <mbryzek@arsdigita.com>
- Ben Adida <ben@openforce.net>
- Created:
- 02/01/2001
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- auth_authenticate, auth_create_user, object_p, category_tree_procs