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

		return null;
	}

	$addResult = GroupAccessTable::add($fields);
	if (!$addResult)
	{
		$this->addErrors($addResult->getErrors());

		return null;
	}

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