• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/lib/inheritedproperty/elementvalues.php
  • Класс: BitrixIblockInheritedPropertyElementValues
  • Вызов: ElementValues::getParents
public function getParents()
{
	$parents = array();
	if ($this->elementId > 0)
	{
		$elementList = BitrixIblockElementTable::getList(array(
			"select" => array("IBLOCK_SECTION_ID"),
			"filter" => array("=ID" => $this->elementId),
		));
		$element = $elementList->fetch();
		if ($element && $element["IBLOCK_SECTION_ID"] > 0)
			$parents[] = new SectionValues($this->iblockId, $element["IBLOCK_SECTION_ID"]);
		else
			$parents[] = new IblockValues($this->iblockId);
	}
	elseif ($this->sectionId > 0)
	{
		$parents[] = new SectionValues($this->iblockId, $this->sectionId);
	}
	else
	{
		$parents[] = new IblockValues($this->iblockId);
	}
	return $parents;
}