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


User Comments

User comments are not part of official documentation. Use information provided by other users in the comments at your own risk.

The User Comments section is not to be used as a feature discussion board. Only registered users can post comments. Your comment will be visible once it has been approved by the moderator.
© «Bitrix24», 2001-2022