• Модуль: lists
  • Путь к файлу: ~/bitrix/modules/lists/lib/entity/iblock.php
  • Класс: BitrixListsEntityIblock
  • Вызов: Iblock::update
public function update()
{
	$this->param->checkRequiredInputParams(["IBLOCK_TYPE_ID", "IBLOCK_CODE", "IBLOCK_ID"]);
	if ($this->param->hasErrors())
	{
		$this->errorCollection->add($this->param->getErrors());
		return false;
	}

	$iblockObject = new CIBlock;
	if ($iblockObject->update($this->iblockId, $this->getFields()))
	{
		return true;
	}
	else
	{
		if ($iblockObject->LAST_ERROR)
		{
			$this->errorCollection->setError(new Error($iblockObject->LAST_ERROR, self::ERROR_UPDATE_IBLOCK));
		}
		else
		{
			$this->errorCollection->setError(new Error("Unknown error", self::ERROR_UPDATE_IBLOCK));
		}

		return false;
	}
}