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