• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/controller/numerator.php
  • Класс: BitrixMainControllerNumerator
  • Вызов: Numerator::saveAction
public function saveAction()
{
	$request = $this->getRequest();
	$result = (new MainNumeratorServiceNumeratorRequestManager($request))->saveFromRequest();

	if (!$result->isSuccess())
	{
		foreach ($result->getErrorCollection() as $index => $error)
		{
			$this->errorCollection[] = $error;
		}
		return [];
	}
	$resultData = $result->getData();
	$numeratorType = null;
	if (!empty($resultData) && !empty($resultData['TYPE']))
	{
		$numeratorType = $resultData['TYPE'];
	}
	return ['id' => $id = $result->getId(), 'type' => $numeratorType];
}