Created
May 2, 2019 17:15
-
-
Save artemrogov/424eeec53404ae09c2e6c86dcf36228f to your computer and use it in GitHub Desktop.
Выборать все книги каталога с ID = 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Выборать все книги каталога с ID = 2 | |
*/ | |
if (CModule::IncludeModule('highloadblock')) { | |
$id_catalog = 2; | |
$arHLBlock = Bitrix\Highloadblock\HighloadBlockTable::getById(4)->fetch(); | |
$obEntity = Bitrix\Highloadblock\HighloadBlockTable::compileEntity($arHLBlock); | |
$strEntityDataClass = $obEntity->getDataClass(); | |
$result = $strEntityDataClass::getList(); | |
$resultFilter = $strEntityDataClass::getList( | |
array( | |
'select'=>array('ID','UF_NAME_BOOK','UF_CATALOG_ID_H'), | |
'filter'=>array('=UF_CATALOG_ID_H'=>$id_catalog), | |
)); | |
foreach($resultFilter as $res){ | |
echo '<p> ID ELEMENT: '.$res["ID"].' '.$res["UF_NAME_BOOK"].' ID_CATALOG: '.$res["UF_CATALOG_ID_H"].'</p>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment