• Модуль: intranet
  • Путь к файлу: ~/bitrix/modules/intranet/lib/integration/templates/bitrix24/themepicker.php
  • Класс: BitrixIntranetIntegrationTemplatesBitrix24ThemePicker
  • Вызов: ThemePicker::sortItems
private function sortItems(&$themes)
{
	/** @var array $themesUsage */
	$themesUsage = CUserOptions::getOption("intranet", $this->getLastThemesOptionName(), [], $this->getUserId());
	$themesUsage = array_flip($themesUsage);

	foreach ($themes as &$theme)
	{
		if (isset($themesUsage[$theme["id"]]))
		{
			$theme["sort"] = $themesUsage[$theme["id"]];
		}
	}

	sortByColumn($themes, array("sort" => SORT_ASC));
}