Advertisement
Guest User

Untitled

a guest
Mar 4th, 2015
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.85 KB | None | 0 0
  1. <?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
  2.  
  3. use Bitrix\Highloadblock as HL;
  4. use Bitrix\Main\Entity;
  5.  
  6. class CSavedSearches extends CBitrixComponent
  7. {
  8.  
  9. public $arResult = array();
  10.  
  11. public function __construct () {
  12.     CModule::IncludeModule("highloadblock");
  13. }
  14.  
  15. public function executeComponent()
  16. {
  17.  
  18.     $hlblock = HL\HighloadBlockTable::getById(1)->fetch();
  19.  
  20.     $entity = HL\HighloadBlockTable::compileEntity($hlblock);
  21.     $entity_data_class = $entity->getDataClass();
  22.  
  23.     $rsProp = $entity_data_class::getList(Array("select"   => Array('*')));
  24.  
  25.     while($arProp = $rsProp->Fetch())
  26.     {
  27.  
  28.     $arElements[] = $arProp;
  29.  
  30.     }
  31.  
  32.     $this->arResult = $arElements;
  33.    
  34.     echo "<pre>"; print_r($this->arResult); echo "</pre>";
  35.  
  36.     $this->includeComponentTemplate();
  37.  
  38.     return $this->arResult;
  39. }
  40. }?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement