Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
company.php
1<?php
3
5
6class Company extends Base
7{
8 //COMPANY
9 //COMPANY_ADR
10 //INN
11 //KPP
12 //CONTACT_PERSON
13 //EMAIL
14 //PHONE
15 //FAX
16 //ZIP
17 //CITY
18 //LOCATION
19 //ADDRESS
20
21 public function getCompany()
22 {
23 return $this->fields->get('COMPANY');
24 }
25
26 public function setCompany($value)
27 {
28 $this->fields->set('COMPANY', $value);
29 return $this;
30 }
31
32 public function getCompanyAdr()
33 {
34 return $this->fields->get('COMPANY_ADR');
35 }
36
37 public function setCompanyAdr($value)
38 {
39 $this->fields->set('COMPANY_ADR', $value);
40 return $this;
41 }
42
43 public function getInn()
44 {
45 return $this->fields->get('INN');
46 }
47
48 public function setInn($value)
49 {
50 $this->fields->set('INN', $value);
51 return $this;
52 }
53
54 public function getKpp()
55 {
56 return $this->fields->get('KPP');
57 }
58
59 public function setKpp($value)
60 {
61 $this->fields->set('KPP', $value);
62 return $this;
63 }
64
65 public function getContactPerson()
66 {
67 return $this->fields->get('CONTACT_PERSON');
68 }
69
70 public function setContactPerson($value)
71 {
72 $this->fields->set('CONTACT_PERSON', $value);
73 return $this;
74 }
75
76 public function getEmail()
77 {
78 return $this->fields->get('EMAIL');
79 }
80
81 public function setEmail($value)
82 {
83 $this->fields->set('EMAIL', $value);
84 return $this;
85 }
86
87 public function getPhone()
88 {
89 return $this->fields->get('PHONE');
90 }
91
92 public function setPhone($value)
93 {
94 $this->fields->set('PHONE', $value);
95 return $this;
96 }
97
98 public function getFax()
99 {
100 return $this->fields->get('FAX');
101 }
102
103 public function setFax($value)
104 {
105 $this->fields->set('FAX', $value);
106 return $this;
107 }
108
109 public function getZip()
110 {
111 return $this->fields->get('ZIP');
112 }
113
114 public function setZip($value)
115 {
116 $this->fields->set('ZIP', $value);
117 return $this;
118 }
119
120 public function getCity()
121 {
122 return $this->fields->get('CITY');
123 }
124
125 public function setCity($value)
126 {
127 $this->fields->set('CITY', $value);
128 return $this;
129 }
130
131 public function getLocation()
132 {
133 return $this->fields->get('LOCATION');
134 }
135
136 public function setLocation($value)
137 {
138 $this->fields->set('LOCATION', $value);
139 return $this;
140 }
141
142 public function getAddress()
143 {
144 return $this->fields->get('ADDRESS');
145 }
146
147 public function setAddress($value)
148 {
149 $this->fields->set('ADDRESS', $value);
150 return $this;
151 }
152
153 public function getType()
154 {
155 return EntityType::TYPE_E;
156 }
157
158 static protected function resolveFields(array $list)
159 {
160 $result = [];
161 foreach($list as $item)
162 {
163 $result['ID'] = $item['SALE_INTERNALS_ORDER_USER_ID'];
164
165 $result[$item['SALE_INTERNALS_ORDER_PROPERTY_CODE']] = $item['SALE_INTERNALS_ORDER_PROPERTY_VALUE'];
166 }
167 return $result;
168 }
169
170 static public function createFromArray(array $fields)
171 {
172 return new static([
173 'ID' => $fields['ID'],
174 'TITLE' => $fields['COMPANY'],
175 'COMPANY_ADR' => $fields['COMPANY_ADR'],
176 'EMAIL' => $fields['EMAIL'],
177 'PHONE' => $fields['PHONE'],
178 'ZIP' => $fields['ZIP'],
179 'CITY' => $fields['CITY'],
180 'ADDRESS' => $fields['ADDRESS'],
181 ]);
182 }
183}