• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/location/search/chain.php
  • Класс: BitrixSaleLocationSearchChainTable
  • Вызов: ChainTable::__construct
public function __construct($parameters = array())
{
	$this->resetProcess();

	if(is_array($parameters['TYPES']) && !empty($parameters['TYPES']))
	{
		$this->procData['ALLOWED_TYPES'] = array_unique($parameters['TYPES']);
	}

	$typeSort = array();
	$res = LocationTypeTable::getList(array('select' => array('ID', 'CODE', 'DISPLAY_SORT')));

	$this->procData['TYPES'] = array();
	$this->procData['TYPE_SORT'] = array();

	while($item = $res->fetch())
	{
		if(!is_array($this->procData['ALLOWED_TYPES']) || (is_array($this->procData['ALLOWED_TYPES']) && in_array($item['ID'], $this->procData['ALLOWED_TYPES'])))
			$this->procData['TYPES'][$item['CODE']] = $item['ID'];

		$this->procData['TYPE_SORT'][$item['ID']] = $item['DISPLAY_SORT'];
	}

	$this->procData['TYPES_BACK'] = array_flip($this->procData['TYPES']);

	$this->initInsertHandles();
}