• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/v2/BaseEntity.php
  • Класс: BitrixCatalogv2BaseEntity
  • Вызов: BaseEntity::saveInternal
public function saveInternal(): Result
{
	$result = new Result();

	if ($this->hasChangedFields())
	{
		$res = $this->saveInternalEntity();

		if (!$res->isSuccess())
		{
			$result->addErrors($res->getErrors());
		}
	}

	if ($result->isSuccess())
	{
		foreach ($this->getChildCollections() as $childCollection)
		{
			$res = $childCollection->saveInternal();

			if (!$res->isSuccess())
			{
				$result->addErrors($res->getErrors());
			}
		}
	}

	return $result;
}