• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/helpers/order/builder/orderbuilderrest.php
  • Класс: BitrixSaleHelpersOrderBuilderOrderBuilderRest
  • Вызов: OrderBuilderRest::setProperties
public function setProperties()
{
	if(!isset($this->formData["PROPERTIES"]))
	{
		return $this;
	}

	$r = $this->removePropertyValues();
	if($r->isSuccess() == false)
	{
		$this->getErrorsContainer()->addErrors($r->getErrors());
		return $this;
	}

	$this->formData["PROPERTIES"] = File::getPostWithFiles(
		$this->formData["PROPERTIES"],
		$this->settingsContainer->getItemValue('propsFiles')
	);

	$propCollection = $this->order->getPropertyCollection();

	foreach ($this->formData["PROPERTIES"] as $id=>$value)
	{
		if(($propertyValue = $propCollection->getItemByOrderPropertyId($id)))
		{
			$propertyValue->setValue($value);
		}
	}

	return $this;
}