Documentation

RemoveOption

bool
COption::RemoveOption(
 string module_id,
 string name = "",
 string site = false
)

The method removes one (option_id) or all module parameters of the module_id from the database. If the site_id parameter is not specified, an attempt is made to find an option_id numeric value, belonging to the module_id for the current site. If such parameter does not exist, the parameter, general to all sites is returned. Static method.

Parameters

ParameterDescription Available from version
module_id Module ID.
name Parameter ID.
Optional parameter. Empty by default (delete all values of the module parameters).
site Site ID for which the parameters are to be returned. Optional parameter. False by default (for the current site, or for all sites, if parameters are not specified)

See Also

Example of use

<?  
// remove parameter "Results per page" 
// of the "Web forms" module from the database
COption::RemoveOption("form", "RESULTS_PAGEN");
?>


© «Bitrix24», 2001-2024