• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/propertyvalue.php
  • Класс: BitrixSalePropertyValue
  • Вызов: PropertyValue::add
protected function add()
{
	/** @var PropertyValueCollection $propertyCollection */
	$propertyCollection = $this->getCollection();

	/** @var OrderBase $order */
	if (!$order = $propertyCollection->getOrder())
	{
		throw new MainObjectNotFoundException('Entity "Order" not found');
	}

	$logFields = [];
	if ($order->getId() > 0)
	{
		$logFields = $this->getLogFieldsForAdd();
	}

	$result = parent::add();
	if ($result->isSuccess())
	{
		if ($order->getId() > 0)
		{
			$this->addToLog('PROPERTY_ADD', $logFields);
		}
	}

	return $result;
}