Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
catalogviewmanager.php
1<?php
2
3
5
11
13{
19 public function getView(Engine\Controller $controller)
20 {
21 if ($controller instanceof Controller\PriceType)
22 {
23 return new RestView\PriceType();
24 }
25
26 if ($controller instanceof Controller\PriceTypeLang)
27 {
28 return new RestView\PriceTypeLang();
29 }
30
31 if ($controller instanceof Controller\PriceTypeGroup)
32 {
33 return new RestView\PriceTypeGroup();
34 }
35
36 if ($controller instanceof Controller\RoundingRule)
37 {
38 return new RestView\RoundingRule();
39 }
40
41 if ($controller instanceof Controller\Enum)
42 {
43 return new RestView\Enum();
44 }
45
46 if ($controller instanceof Controller\Extra)
47 {
48 return new RestView\Extra();
49 }
50
51 if ($controller instanceof Controller\Measure)
52 {
53 return new RestView\Measure();
54 }
55
56 if ($controller instanceof Controller\Ratio)
57 {
58 return new RestView\Ratio();
59 }
60
61 if ($controller instanceof Controller\Vat)
62 {
63 return new RestView\Vat();
64 }
65
66 if ($controller instanceof Controller\Store)
67 {
68 return new RestView\Store();
69 }
70
71 if ($controller instanceof Controller\StoreProduct)
72 {
73 return new RestView\StoreProduct();
74 }
75
76 if ($controller instanceof Controller\Product)
77 {
78 return new RestView\Product();
79 }
80
81 if ($controller instanceof Controller\Catalog)
82 {
83 return new RestView\Catalog();
84 }
85
86 if ($controller instanceof Controller\Section)
87 {
88 return new RestView\Section();
89 }
90
91 if ($controller instanceof Controller\Price)
92 {
93 return new RestView\Price();
94 }
95
96 if ($controller instanceof Controller\ProductImage)
97 {
98 return new RestView\ProductImage();
99 }
100
101 if ($controller instanceof Controller\ProductProperty)
102 {
103 return new RestView\ProductProperty();
104 }
105
106 if ($controller instanceof Controller\ProductPropertyEnum)
107 {
108 return new RestView\ProductPropertyEnum();
109 }
110
111 if ($controller instanceof Controller\ProductPropertyFeature)
112 {
113 return new RestView\ProductPropertyFeature();
114 }
115
116 if ($controller instanceof Controller\ProductPropertySection)
117 {
118 return new RestView\ProductPropertySection();
119 }
120
121 if ($controller instanceof Controller\Document)
122 {
123 return new RestView\Document();
124 }
125
126 if ($controller instanceof Controller\Document\Element)
127 {
128 return new RestView\DocumentElement();
129 }
130
131 throw new RestException('Unknown object ' . get_class($controller));
132 }
133}