- Модуль: lists
- Путь к файлу: ~/bitrix/modules/lists/lib/entity/section.php
- Класс: BitrixListsEntitySection
- Вызов: Section::update
public function update()
{
$this->param->checkRequiredInputParams(["IBLOCK_CODE", "IBLOCK_ID",
"SECTION_ID", "SECTION_CODE", ["FIELDS" => ["NAME"]]]);
if ($this->param->hasErrors())
{
$this->errorCollection->add($this->param->getErrors());
return false;
}
$sectionObject = new CIBlockSection;
if ($sectionObject->update($this->sectionId, $this->getFields()))
{
return true;
}
else
{
if ($sectionObject->LAST_ERROR)
{
$this->errorCollection->setError(new Error($sectionObject->LAST_ERROR, self::ERROR_UPDATE_SECTION));
}
else
{
$this->errorCollection->setError(new Error("Unknown error", self::ERROR_UPDATE_SECTION));
}
return false;
}
}