• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/controller/roundingrule.php
  • Класс: BitrixCatalogControllerRoundingRule
  • Вызов: RoundingRule::addAction
public function addAction(array $fields): ?array
{
	$checkFieldsResult = $this->checkFields($fields);
	if (!$checkFieldsResult->isSuccess())
	{
		$this->addErrors($checkFieldsResult->getErrors());
		return null;
	}

	$addResult = RoundingTable::add($fields);
	if (!$addResult->isSuccess())
	{
		$this->addErrors($addResult->getErrors());
		return null;
	}

	return ['ROUNDING_RULE' => $this->get($addResult->getId())];
}