• Publicity: Public Only All

parameter-procs.tcl

parameter procs

Location:
packages/acs-tcl/tcl/parameter-procs.tcl
Created:
May 12, 2002
Author:
yon <yon@openforce.net>
CVS Identification:
$Id: parameter-procs.tcl,v 1.28 2024/09/11 06:15:48 gustafn Exp $

Procedures in this file

Detailed information

parameter::get (public)

 parameter::get [ -localize ] [ -boolean ] [ -package_id package_id ] \
    -parameter parameter [ -default default ]

Get the value of a package instance parameter.

Switches:
-localize (optional, boolean)
should we attempt to localize the parameter
-boolean (optional, boolean)
ensure boolean parameters are normalized to 0 or 1
-package_id (optional)
what package to get the parameter from. Defaults to [ad_conn package_id]
-parameter (required)
which parameter's value to get
-default (optional)
what to return if we don't find a value. Defaults to returning the empty string.
Returns:
The string trimmed (leading and trailing spaces removed) parameter value
See Also:

Testcases:
auth_password_change, locale__test_system_package_setting, acs_subsite_test_email_confirmation, password_recovery_page, subsite_api, parameter_register_test, parameter__check_procs, logout_from_everywhere, cookie_consent__setup

parameter::get_from_package_key (public)

 parameter::get_from_package_key [ -localize ] [ -boolean ] \
    -package_key package_key -parameter parameter [ -default default ]

Gets an instance parameter for the package corresponding to package_key. Note that this makes the assumption that the package is a singleton. New packages should use global parameters instead.

Switches:
-localize (optional, boolean)
-boolean (optional, boolean)
-package_key (required)
what package to get the parameter from. We will try to get the package_id from the package_key. This may cause an error if there are more than one instance of this package
-parameter (required)
which parameter's value to get
-default (optional)
what to return if we don't find a value

Testcases:
parameter__check_procs, spellcheck__get_element_formtext, spellcheck__spellcheck_properties

parameter::get_global_value (public)

 parameter::get_global_value [ -localize ] [ -boolean ] \
    -package_key package_key -parameter parameter [ -default default ]

Get the value of a global package parameter.

Switches:
-localize (optional, boolean)
should we attempt to localize the parameter
-boolean (optional, boolean)
ensure boolean parameters are normalized to 0 or 1
-package_key (required)
identifies the package to which the global param belongs
-parameter (required)
which parameter's value to get
-default (optional)
what to return if we don't find a value. Defaults to returning the empty string.
Returns:
The string trimmed (leading and trailing spaces removed) parameter value
See Also:

Testcases:
parameter_register_test, parameter__check_procs

parameter::set_default (public)

 parameter::set_default -package_key package_key -parameter parameter \
    -value value

Set the default for the package parameter to the provided value. The new default will be used for new installs of the package but does not change existing package instances values.

Switches:
-package_key (required)
what package to set the parameter for
-parameter (required)
which parameter's value to set
-value (required)
what value to set said parameter to

Testcases:
parameter__check_procs

parameter::set_from_package_key (public)

 parameter::set_from_package_key -package_key package_key \
    -parameter parameter -value value

sets an instance parameter for the package corresponding to package_key. Note that this makes the assumption that the package is a singleton and does not set the value for all packages corresponding to package_key. New packages should use global parameters instead.

Switches:
-package_key (required)
-parameter (required)
-value (required)

Testcases:
parameter__check_procs

parameter::set_global_value (public)

 parameter::set_global_value -package_key package_key \
    -parameter parameter -value value

Set a global package parameter. Do not confuse this with the proc "set_from_package_key", which was previously used to emulate global parameters declared for singleton packages.

Switches:
-package_key (required)
identifies the package to which the global param belongs
-parameter (required)
which parameter's value to set
-value (required)
what value to set said parameter to

Testcases:
parameter__check_procs

parameter::set_value (public)

 parameter::set_value [ -package_id package_id ] -parameter parameter \
    -value value

Set the value of a package instance parameter.

Switches:
-package_id (optional)
what package to set the parameter in. Defaults to [ad_conn package_id]
-parameter (required)
which parameter's value to set
-value (required)
what value to set said parameter to

Testcases:
auth_password_change, auth_use_email_for_login_p, auth_email_on_password_change, locale__test_system_package_setting, password_recovery_page, subsite_api, parameter__check_procs
[ show source ]