• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/orm/fields/secretfield.php
  • Класс: BitrixMainORMFieldsSecretField
  • Вызов: SecretField::__construct
public function __construct($name, $parameters = [])
{
	//the order of modifiers is important
	$this->addSaveDataModifier([$this, 'encode']);

	parent::__construct($name, $parameters);

	$this->addFetchDataModifier([$this, 'decode']);

	if(isset($parameters['secret_length']))
	{
		$this->configureSecretLength($parameters['secret_length']);
	}

	$this->configureDefaultValue([$this, 'getRandomBytes']);
}