Documentation

SetOptionInt

bool
COption::SetOptionInt(
 string module_id,
 string name,
 mixed value = "",
 mixed desc = false,
 string site = false
)

The method returns numeric parameter option_id for the module module_id. If site_id is specified, the parameter will be defined only for this site and won't affect the similar parameter of another site. Returns "true", on success, or false otherwise. Static method.

Parameters

Parameter Description Available from versionNot used
module_id Module ID.
name Parameter ID.
value Parameter value.
Optional. Empty by default.
desc Parameter description.
Optional parameter. False by default, which means the description is missing.
site Site ID for which the parameter is specified. Optional parameter. False by default (general parameter for all sites).

See Also

Examples of use

<?
// set the field value
// "Number of additional menu parameters" 
// in the "Site explorer" module settings 
COption::SetOptionInt("fileman", "num_menu_param", 2);
?>


© «Bitrix24», 2001-2024
Up