- Модуль: main
- Путь к файлу: ~/bitrix/modules/main/classes/general/entity_u_field.php
- Класс: CUEntityField
- Вызов: CUEntityField::__construct
public function __construct(array $info, CBaseEntity $entity)
{
global $USER_FIELD_MANAGER;
$user_type = $USER_FIELD_MANAGER->GetUserType($info['USER_TYPE_ID']);
$this->base_type = $user_type['BASE_TYPE'];
if (in_array($this->base_type, array('int', 'enum', 'file'), true))
{
$data_type = 'integer';
}
elseif ($this->base_type == 'double')
{
$data_type = 'float';
}
elseif ($this->base_type == 'string')
{
$data_type = 'string';
}
elseif (in_array($this->base_type, array('date', 'datetime'), true))
{
$data_type = 'datetime';
}
else
{
$data_type = 'string';
}
parent::__construct($info['FIELD_NAME'], $data_type, $entity);
$this->is_multiple = $info['MULTIPLE'] === 'Y';
$this->type_id = $info['USER_TYPE_ID'];
$this->field_id = $info['ID'];
}