/**
  * Родительский раздел
  * @return IblockSection
  */
 public function getSection()
 {
     if (!$this->_section) {
         $this->_section = IblockSection::getByPrimary($this->_fields['IBLOCK_SECTION_ID']);
     }
     return $this->_section;
 }
Example #2
0
 /**
  * Корневые разделы инфоблока
  * @param array $params
  * @return \Bitrix\Main\DB\Result
  */
 public function getSectionsTopLevel(array $params = [])
 {
     if (!isset($params['filter'])) {
         $params['filter'] = [];
     }
     $params['filter'] = array_merge(['=IBLOCK_ID' => $this->ID, '=IBLOCK_SECTION_ID' => null], $params['filter']);
     return IblockSection::getList($params);
 }
 /**
  * Связный раздел
  * @return IblockSection
  */
 public function getValueSection()
 {
     return IblockSection::getByPrimary($this->_fields['VALUE']);
 }
 /**
  * Список связных разделов
  * @return array
  */
 protected function getValuesSections()
 {
     return IblockSection::getListByField("=IBLOCK_ID", $this->_fields['LINK_IBLOCK_ID'])->fetchAll();
 }