- Модуль: main
- Путь к файлу: ~/bitrix/modules/main/lib/entity/referencefield.php
- Класс: BitrixMainEntityReferenceField
- Вызов: ReferenceField::__construct
public function __construct($name, $refEntity, $reference, $parameters = array())
{
parent::__construct($name);
if ($refEntity instanceof Base)
{
$this->refEntity = $refEntity;
$this->refEntityName = $refEntity->getFullName();
}
else
{
// this one could be without leading backslash and/or with Table-postfix
$this->refEntityName = Base::normalizeName($refEntity);
}
if (empty($reference))
{
throw new ArgumentException('Reference for `'.$name.'` shouldn't be empty');
}
$this->reference = $reference;
if (isset($parameters['join_type']))
{
$join_type = strtoupper($parameters['join_type']);
if (in_array($join_type, array('LEFT', 'INNER', 'RIGHT'), true))
{
$this->join_type = $join_type;
}
}
}