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

	// ToDo make lazyLoad for getPropertyCollection() to not load collection everytime
	if ($this->isChanged())
	{
		// ToDo re-initialize saved ids from database after file save - check in CIBlockElement::SetPropertyValues
		// property collection can't be saved one by one, all simultaneously
		$res = $this->repository->save(...$this->getIterator());

		if ($res->isSuccess())
		{
			$this->clearChanged();
		}
		else
		{
			$result->addErrors($res->getErrors());
		}
	}

	return $result;
}