Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
crmviewmanager.php
1<?php
2
3
5
6
10use \Bitrix\Crm\RestView;
11use \Bitrix\Crm\Controller;
12
13final class CrmViewManager extends ViewManager
14{
20 public function getView(Engine\Controller $controller)
21 {
22 if($controller instanceof Controller\Enum)
23 {
24 $entity = new RestView\Enum();
25 }
26 elseif($controller instanceof Controller\OrderEntity)
27 {
28 $entity = new RestView\OrderEntity();
29 }
30 elseif($controller instanceof Controller\BuyerGroup)
31 {
32 $entity = new RestView\BuyerGroup();
33 }
34 else
35 {
36 throw new RestException('Unknown object ' . get_class($controller));
37 }
38
39 return $entity;
40 }
41}
getView(Engine\Controller $controller)