CModule IncludeModule highloadblock foreach arPropCode as arProp rsDat

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
CModule::IncludeModule("highloadblock");
foreach($arPropCode as &$arProp)
{
$rsData = \Bitrix\Highloadblock\HighloadBlockTable::getList(array('filter'=>array('NAME' => $arProp["NAME"])));
if($arData = $rsData->fetch())
{
$entity = \Bitrix\Highloadblock\HighloadBlockTable::compileEntity($arData);
$mainQuery = new \Bitrix\Main\Entity\Query($entity);
$mainQuery->setOrder(array());
$mainQuery->setFilter(array('XML_ID'=> $arProp["XML_ID"]));
$mainQuery->setSelect(array('*'));
$rsResult = $mainQuery->exec();
$rsResult = new CDBResult($rsResult);
while ($arRow = $rsResult->Fetch())
{
$arProp["VALUE"] = $arRow["UF_NAME"];
}
}
}
unset($arProp);
foreach($arResult["DISPLAY_PROPERTIES"] as &$arItem)
{
if($arItem["USER_TYPE"] == "directory")
{
$arItem["VALUE"] = $arPropCode[$arItem["VALUE"]]["VALUE"];
}
}
unset($arItem);