• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/entity_query_chain_element.php
  • Класс: CEntityQueryChainElement
  • Вызов: CEntityQueryChainElement::__construct
public function __construct($element, $parameters = array())
{
	if ($element instanceof CReferenceEntityField)
	{
		$this->type = 2;
	}
	elseif (is_array($element)
		&& $element[0] instanceof CBaseEntity
		&& $element[1] instanceof CReferenceEntityField
	)
	{
		$this->type = 3;
	}
	elseif ($element instanceof CBaseEntity)
	{
		$this->type = 4;
	}
	elseif ($element instanceof CEntityField)
	{
		$this->type = 1;
	}
	else
	{
		throw new Exception(sprintf('Invalid value for QueryChainElement: %s.', $element));
	}

	$this->value = $element;
	$this->parameters = $parameters;
}