• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/classes/general/prop_element_list.php
  • Класс: CIBlockPropertyElementList
  • Вызов: CIBlockPropertyElementList::GetOptionsHtml
static function GetOptionsHtml($arProperty, $values, &$bWasSelect)
{
	$options = "";
	$settings = CIBlockPropertyElementList::PrepareSettings($arProperty);
	$bWasSelect = false;

	if($settings["group"] === "Y")
	{
		$arElements = CIBlockPropertyElementList::GetElements($arProperty["LINK_IBLOCK_ID"]);
		$arTree = CIBlockPropertyElementList::GetSections($arProperty["LINK_IBLOCK_ID"]);
		foreach($arElements as $i => $arElement)
		{
			if(
				$arElement["IN_SECTIONS"] == "Y"
				&& array_key_exists($arElement["IBLOCK_SECTION_ID"], $arTree)
			)
			{
				$arTree[$arElement["IBLOCK_SECTION_ID"]]["E"][] = $arElement;
				unset($arElements[$i]);
			}
		}

		foreach($arTree as $arSection)
		{
			$options .= '';
			if(isset($arSection["E"]))
			{
				foreach($arSection["E"] as $arItem)
				{
					$options .= '';
		}
		foreach($arElements as $arItem)
		{
			$options .= '