• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/compatible/compatible.php
  • Класс: BitrixSaleCompatibleAliasedQuery
  • Вызов: AliasedQuery::addAliasFilter
public function addAliasFilter($key, $value)
{
	preg_match('/^([!%@<=>]{0,3})(.*)$/', $key, $matches);

	return ($name = $this->getAliasName($matches[2]))
		? $this->addFilter($matches[1].$name, $value)
		: $this;

	// TODO recursive filters maybe?
//		if (is_null($key) && is_array($value))
//		{
//			return ($filter = self::getAliasFilterRecursive($value))
//				? $this->addFilter(null, $filter)
//				: $this;
//		}
//		else
//		{
//			preg_match('/^([!%@<=>]{0,3})(.*)$/', $key, $matches);
//
//			$alias = $matches[2];
//
//			if (! ($name = $this->getAliasName($alias)))
//			{
//				if ($this->getEntity()->hasField($alias))
//					$name = $alias;
//				else
//					return $this;
//			}
//
//			$key = $matches[1].$name;
//			return parent::addFilter($key, $value);
//		}
}