Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
saleviewmanager.php
1<?php
2
3
5
6
26
28{
34 public function getView(Controller $controller)
35 {
36 $entity = null;
37 if($controller instanceof Integration\Controller\StatisticProvider)
38 {
39 $entity = new Integration\RestView\StatisticProvider();
40 }
41 elseif($controller instanceof Integration\Controller\Statistic)
42 {
43 $entity = new Integration\RestView\Statistic();
44 }
45 elseif($controller instanceof Profile)
46 {
47 $entity = new \Bitrix\Sale\Rest\View\Profile();
48 }
49 elseif($controller instanceof ProfileValue)
50 {
51 $entity = new \Bitrix\Sale\Rest\View\ProfileValue();
52 }
53 elseif ($controller instanceof PersonType)
54 {
55 $entity = new \Bitrix\Sale\Rest\View\PersonType();
56 }
57 elseif ($controller instanceof PropertyGroup)
58 {
59 $entity = new \Bitrix\Sale\Rest\View\PropertyGroup();
60 }
61 elseif ($controller instanceof PropertyRelation)
62 {
63 $entity = new \Bitrix\Sale\Rest\View\PropertyRelation();
64 }
65 elseif ($controller instanceof PropertyValue)
66 {
67 $entity = new \Bitrix\Sale\Rest\View\PropertyValue();
68 }
69 elseif ($controller instanceof Enum)
70 {
71 $entity = new \Bitrix\Sale\Rest\View\Enum();
72 }
73 elseif ($controller instanceof DeliveryServices)
74 {
75 $entity = new \Bitrix\Sale\Rest\View\DeliveryServices();
76 }
77 elseif ($controller instanceof PropertyVariant)
78 {
79 $entity = new \Bitrix\Sale\Rest\View\PropertyVariant();
80 }
81 elseif ($controller instanceof Status)
82 {
83 $entity = new \Bitrix\Sale\Rest\View\Status();
84 }
85 elseif ($controller instanceof StatusLang)
86 {
87 $entity = new \Bitrix\Sale\Rest\View\StatusLang();
88 }
89 elseif ($controller instanceof TradeBinding)
90 {
91 $entity = new \Bitrix\Sale\Rest\View\TradeBinding();
92 }
93 elseif ($controller instanceof TradePlatform)
94 {
95 $entity = new \Bitrix\Sale\Rest\View\TradePlatform();
96 }
97 elseif ($controller instanceof BusinessValuePersonDomain)
98 {
99 $entity = new \Bitrix\Sale\Rest\View\BusinessValuePersonDomain();
100 }
101 elseif ($controller instanceof PaymentItemBasket)
102 {
103 $entity = new \Bitrix\Sale\Rest\View\PaymentItemBasket();
104 }
105 elseif ($controller instanceof PaymentItemShipment)
106 {
107 $entity = new \Bitrix\Sale\Rest\View\PaymentItemShipment();
108 }
109 else
110 {
111 throw new RestException('Unknown object ' . get_class($controller));
112 }
113 return $entity;
114 }
115}