• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/lib/template/entity/section.php
  • Класс: BitrixIblockTemplateEntitySection
  • Вызов: Section::setFields
public function setFields(array $fields)
{
	parent::setFields($fields);
	if (
		is_array($this->fields)
		&& $this->fields["IBLOCK_ID"] > 0
	)
	{
		$properties = array();
		foreach ($this->fields as $id => $value)
		{
			if (mb_substr($id, 0, 3) === "UF_")
				$properties[$id] = $value;
		}
		$this->property = new SectionProperty($this->id);
		$this->property->setIblockId($this->fields["IBLOCK_ID"]);
		$this->property->setFields($properties);

		$this->iblock = new Iblock($fields["IBLOCK_ID"]);

		if (
			isset($fields["IBLOCK_SECTION_ID"])
			&& $fields["IBLOCK_SECTION_ID"] > 0
		)
		{
			$this->parent = new Section($fields["IBLOCK_SECTION_ID"]);
			$this->sections = new SectionPath($fields["IBLOCK_SECTION_ID"]);
		}

		if (BitrixMainLoader::includeModule('catalog'))
			$this->catalog = new ElementCatalog($this->id);
	}
}