• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/entity_query.php
  • Класс: CEntityQuery
  • Вызов: CEntityQuery::getJoinCswFields
protected function getJoinCswFields($reference)
{
	$fields = array();

	foreach ($reference as $k => $v)
	{
		if ($k === 'LOGIC')
		{
			continue;
		}

		if (is_numeric($k))
		{
			$fields = array_merge($fields, $this->getJoinCswFields($v));
		}
		else
		{
			// key
			$csw_result = CSQLWhere::MakeOperation($k);
			list($field, ) = array_values($csw_result);

			$fields[$field] = array(
				'TABLE_ALIAS' => 'alias',
				'FIELD_NAME' => $field,
				'FIELD_TYPE' => 'string',
				'MULTIPLE' => '',
				'JOIN' => ''
			);

			// no need to add values as csw fields
		}
	}

	return $fields;
}