Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
businessvaluepersondomain.php
1
<?php
2
3
4
namespace
Bitrix\Sale\Rest\View
;
5
6
7
use
Bitrix\Main\Result
;
8
use
Bitrix\Rest\Integration\View\Attributes
;
9
use
Bitrix\Rest\Integration\View\DataType
;
10
use
Bitrix\Rest\Integration\View\Base
;
11
12
class
BusinessValuePersonDomain
extends
Base
13
{
14
public
function
getFields
(): array
15
{
16
return
[
17
'PERSON_TYPE_ID'
=>[
18
'TYPE'
=>DataType::TYPE_INT,
19
'ATTRIBUTES'
=>[
20
Attributes::REQUIRED,
21
Attributes::IMMUTABLE
22
]
23
],
24
'DOMAIN'
=>[
25
'TYPE'
=>DataType::TYPE_CHAR,
26
'ATTRIBUTES'
=>[
27
Attributes::REQUIRED,
28
Attributes::IMMUTABLE
29
]
30
]
31
];
32
}
33
34
public
function
convertKeysToSnakeCaseArguments
($name, $arguments)
35
{
36
if
($name ==
'deletebyfilter'
)
37
{
38
if
(isset($arguments[
'fields'
]))
39
{
40
$fields = $arguments[
'fields'
];
41
if
(!empty($fields))
42
$arguments[
'fields'
] = $this->
convertKeysToSnakeCaseFields
($fields);
43
}
44
}
45
else
46
{
47
$arguments = parent::convertKeysToSnakeCaseArguments($name, $arguments);
48
}
49
50
return
$arguments;
51
}
52
53
public
function
checkArguments
($name, $arguments):
Result
54
{
55
if
($name ==
'deletebyfilter'
)
56
{
57
$r = $this->
checkFieldsAdd
($arguments[
'fields'
]);
58
}
59
else
60
{
61
$r = parent::checkArguments($name, $arguments);
62
}
63
64
return
$r;
65
}
66
67
public
function
internalizeArguments
($name, $arguments): array
68
{
69
if
($name ==
'deletebyfilter'
)
70
{
71
$fields = $arguments[
'fields'
];
72
if
(!empty($fields))
73
$arguments[
'fields'
] = $this->
internalizeFieldsAdd
($fields);
74
}
75
else
76
{
77
parent::internalizeArguments($name, $arguments);
78
}
79
80
return
$arguments;
81
}
82
}
Bitrix\Main\ORM\Data\Result
Definition
result.php:16
Bitrix\Main\Result
Definition
result.php:14
Bitrix\Rest\Integration\View\Attributes
Definition
attributes.php:8
Bitrix\Rest\Integration\View\Base
Definition
base.php:16
Bitrix\Rest\Integration\View\Base\internalizeFieldsAdd
internalizeFieldsAdd($fields, $fieldsInfo=[])
Definition
base.php:153
Bitrix\Rest\Integration\View\Base\checkFieldsAdd
checkFieldsAdd($fields)
Definition
base.php:717
Bitrix\Rest\Integration\View\Base\convertKeysToSnakeCaseFields
convertKeysToSnakeCaseFields($fields)
Definition
base.php:87
Bitrix\Rest\Integration\View\DataType
Definition
datatype.php:11
Bitrix\Sale\Controller\BusinessValuePersonDomain
Definition
businessvaluepersondomain.php:14
Bitrix\Sale\Rest\View\BusinessValuePersonDomain\internalizeArguments
internalizeArguments($name, $arguments)
Definition
businessvaluepersondomain.php:67
Bitrix\Sale\Rest\View\BusinessValuePersonDomain\convertKeysToSnakeCaseArguments
convertKeysToSnakeCaseArguments($name, $arguments)
Definition
businessvaluepersondomain.php:34
Bitrix\Sale\Rest\View\BusinessValuePersonDomain\checkArguments
checkArguments($name, $arguments)
Definition
businessvaluepersondomain.php:53
Bitrix\Sale\Rest\View\BusinessValuePersonDomain\getFields
getFields()
Definition
businessvaluepersondomain.php:14
Bitrix\Sale\Rest\View
Definition
base.php:3
modules
sale
lib
rest
view
businessvaluepersondomain.php
Создано системой
1.10.0