• Модуль: learning
  • Путь к файлу: ~/bitrix/modules/learning/classes/general/import.php
  • Класс: CCourseImport
  • Вызов: CCourseImport::CreateContent
protected function CreateContent($arItems = Array(), $PARENT_ID = 0)
{
	if ($this->LAST_ERROR <> '')
		return false;

	if (empty($arItems))
	{
		if ($items = $this->objXML->SelectNodes("/manifest/organizations/organization/item/"))
		{
			$arItems = $items->__toArray();
			$arItems = $arItems["#"]["item"];
		}
	}

	foreach ($arItems as $ar)
	{
		$type = mb_substr($ar["@"]["identifier"], 0, 3);
		$res_id = $ar["@"]["identifierref"];
		$title = $ar["#"]["title"][0]["#"];

		$ID = $this->_MakeItems($title, $type, $res_id, $PARENT_ID);

		if (is_set($ar["#"], "item"))
			$this->CreateContent($ar["#"]["item"], $ID);
	}
}