Documentation

Option

Option class is used to handle module parameters, stored in the database. Similar to the class COption to the old core.

Usually, module parameters is performed in the control panel inside settings for corresponding modules.

This class is a replacement (with certain reservations) to the COption class in the old core. The new core method are not separated by int and string, and an array-filter is used when deleting. Also, the new class has several completely new methods that don't have analogues in the old class.

Queries the following namespace:

Method Description Available from version
delete Deletes parameters from database.
get Returns parameter value.
getDefaults Returns array with default values for module parameters
getRealValue Returns actual parameter values, written into database.
set Sets values and saves them to the database.
getForModule Returns array of parameters set for the module. 17.0.4


© «Bitrix24», 2001-2022
Up