• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/ui/entityselector/countryprovider.php
  • Класс: Bitrix\Crm\Integration\UI\EntitySelector\CountryProvider
  • Вызов: CountryProvider::fillDialog
public function fillDialog(Dialog $dialog): void
{
	$items = $this->makeItems();

	array_walk(
		$items,
		static function (Item $item, int $index) use ($dialog) {
			// Show all countries sorted by name without context
			// When context is set, show all countries sorted by name with last recent items in the top
			if (empty($dialog->getContext()))
			{
				$item->setSort($index);
			}
			$dialog->addRecentItem($item);
		}
	);
}