Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
numerator.php
1<?php
3
5
11{
18 public function saveAction()
19 {
20 $request = $this->getRequest();
21 $result = (new Main\Numerator\Service\NumeratorRequestManager($request))->saveFromRequest();
22
23 if (!$result->isSuccess())
24 {
25 foreach ($result->getErrorCollection() as $index => $error)
26 {
27 $this->errorCollection[] = $error;
28 }
29 return [];
30 }
31 $resultData = $result->getData();
32 $numeratorType = null;
33 if (!empty($resultData) && !empty($resultData['TYPE']))
34 {
35 $numeratorType = $resultData['TYPE'];
36 }
37 return ['id' => $id = $result->getId(), 'type' => $numeratorType];
38 }
39}