Trigub_Ilia

Список записей в хайлоадблоке

Dec 17th, 2017 (edited)
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.77 KB | None | 0 0
  1. CModule::IncludeModule("highloadblock");
  2.  
  3. use Bitrix\Highloadblock as HL;
  4. use Bitrix\Main\Entity;
  5.  
  6. $hlbl =  \Bitrix\Highloadblock\HighloadBlockTable::getList([
  7.     'filter' => ['=NAME' => 'OrderItemStorage']
  8. ])->fetch();
  9.  
  10. $hlblock = HL\HighloadBlockTable::getById($hlbl)->fetch();
  11. $hlEntity = HL\HighloadBlockTable::compileEntity($hlblock);
  12. $entDataClass = $hlEntity->getDataClass();
  13. $sTableID = 'tbl_'.$hlblock['TABLE_NAME'];
  14. $arFilter = array("UF_USER_ID"=>1);
  15. $rsData = $entDataClass::getList(array(
  16.     "select" => array('*'),
  17.     "filter" => $arFilter,
  18.     "order" => array("UF_USER_ID"=>"ASC")
  19. ));
  20. $rsData = new CDBResult($rsData, $sTableID);
  21. if (intval($rsData->SelectedRowsCount())>0){
  22.     $arrType = array();
  23.     while($arRes = $rsData->Fetch()){
  24.     }
  25. }
Add Comment
Please, Sign In to add comment