• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/ui/selector/entities.php
  • Класс: BitrixMainUISelectorEntities
  • Вызов: Entities::sortDestinations
static function sortDestinations(&$destinationList, $destSortData)
{
	foreach($destinationList as $type => $dest)
	{
		if (is_array($dest))
		{
			foreach($dest as $key => $value)
			{
				if (isset($destSortData[$key]))
				{
					$destinationList[$type][$key] = array(
						"VALUE" => $value,
						"SORT" => $destSortData[$key]
					);
				}
			}

			uasort($destinationList[$type], array(__CLASS__, 'compareDestinations'));
		}
	}

	foreach($destinationList as $type => $dest)
	{
		if (is_array($dest))
		{
			foreach($dest as $key => $val)
			{
				if (is_array($val))
				{
					$destinationList[$type][$key] = $val["VALUE"];
				}
			}
		}
	}
}