Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
productpropertysection.php
1
<?php
2
3
namespace
Bitrix\Catalog\RestView
;
4
5
use
Bitrix\Rest\Integration\View\Attributes
;
6
use
Bitrix\Rest\Integration\View\DataType
;
7
use
Bitrix\Rest\Integration\View\Base
;
8
9
final
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
}
Bitrix\Catalog\Controller\ProductPropertySection
Definition
productpropertysection.php:15
Bitrix\Catalog\Product\Store\DistributionStrategy\Base
Definition
base.php:21
Bitrix\Catalog\RestView\ProductPropertySection\internalizeArguments
internalizeArguments($name, $arguments)
Definition
productpropertysection.php:41
Bitrix\Catalog\RestView\ProductPropertySection\convertKeysToSnakeCaseArguments
convertKeysToSnakeCaseArguments($name, $arguments)
Definition
productpropertysection.php:62
Bitrix\Catalog\RestView\ProductPropertySection\externalizeResult
externalizeResult($name, $fields)
Definition
productpropertysection.php:86
Bitrix\Catalog\RestView\ProductPropertySection\getFields
getFields()
Definition
productpropertysection.php:14
Bitrix\Rest\Integration\View\Attributes
Definition
attributes.php:8
Bitrix\Rest\Integration\View\Base
Definition
base.php:16
Bitrix\Rest\Integration\View\DataType
Definition
datatype.php:11
Bitrix\Catalog\RestView
Definition
catalog.php:4
modules
catalog
lib
restview
productpropertysection.php
Создано системой
1.10.0