Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
productpropertysection.php
1<?php
2
4
8
9final class ProductPropertySection extends Base
10{
14 public function getFields()
15 {
16 return [
17 'PROPERTY_ID' => [
18 'TYPE' => DataType::TYPE_INT,
19 'ATTRIBUTES' => [
20 Attributes::REQUIRED,
21 ],
22 ],
23 'SMART_FILTER' => [
24 'TYPE' => DataType::TYPE_CHAR,
25 ],
26 'DISPLAY_TYPE' => [
27 'TYPE' => DataType::TYPE_CHAR,
28 ],
29 'DISPLAY_EXPANDED' => [
30 'TYPE' => DataType::TYPE_CHAR,
31 ],
32 'FILTER_HINT' => [
33 'TYPE' => DataType::TYPE_STRING,
34 ],
35 ];
36 }
37
41 public function internalizeArguments($name, $arguments): array
42 {
43 if ($name === 'set')
44 {
45 $fields = $arguments['fields'];
46 if (!empty($fields))
47 {
48 $arguments['fields'] = $this->internalizeFieldsUpdate($fields);
49 }
50 }
51 else
52 {
53 parent::internalizeArguments($name, $arguments);
54 }
55
56 return $arguments;
57 }
58
62 public function convertKeysToSnakeCaseArguments($name, $arguments)
63 {
64 if ($name === 'set')
65 {
66 if (isset($arguments['fields']))
67 {
68 $fields = $arguments['fields'];
69 if (!empty($fields))
70 {
71 $arguments['fields'] = $this->convertKeysToSnakeCaseFields($fields);
72 }
73 }
74 }
75 else
76 {
77 $arguments = parent::convertKeysToSnakeCaseArguments($name, $arguments);
78 }
79
80 return $arguments;
81 }
82
86 public function externalizeResult($name, $fields): array
87 {
88 if ($name !== 'set')
89 {
90 parent::externalizeResult($name, $fields);
91 }
92
93 return $fields;
94 }
95}