Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/main/lib/controller/ |
Upload File : |
<?php namespace Bitrix\Main\Controller; use Bitrix\Main; /** * Class Numerator * @package Bitrix\Main\Controller */ class Numerator extends Main\Engine\Controller { /** * @return array * @throws \Bitrix\Main\ArgumentException * @throws \Bitrix\Main\NotImplementedException * @throws \Bitrix\Main\SystemException */ public function saveAction() { $request = $this->getRequest(); $result = (new Main\Numerator\Service\NumeratorRequestManager($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]; } }