Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
propertyrelation.php
1<?php
2
3
5
6
11
13{
14 public function getFields()
15 {
16 return [
17 'PROPERTY_ID'=>[
18 'TYPE'=>DataType::TYPE_INT,
19 'ATTRIBUTES'=>[
20 Attributes::REQUIRED,
21 Attributes::IMMUTABLE
22 ]
23 ],
24 'ENTITY_ID'=>[
25 'TYPE'=>DataType::TYPE_INT,
26 'ATTRIBUTES'=>[
27 Attributes::REQUIRED,
28 Attributes::IMMUTABLE
29 ]
30 ],
31 'ENTITY_TYPE'=>[
32 'TYPE'=>DataType::TYPE_STRING,
33 'ATTRIBUTES'=>[
34 Attributes::REQUIRED,
35 Attributes::IMMUTABLE
36 ]
37 ]
38 ];
39 }
40
41 public function convertKeysToSnakeCaseArguments($name, $arguments)
42 {
43 if($name == 'deletebyfilter')
44 {
45 if(isset($arguments['fields']))
46 {
47 $fields = $arguments['fields'];
48 if(!empty($fields))
49 $arguments['fields'] = $this->convertKeysToSnakeCaseFields($fields);
50 }
51 }
52 else
53 {
54 $arguments = parent::convertKeysToSnakeCaseArguments($name, $arguments);
55 }
56
57 return $arguments;
58 }
59
60 public function checkArguments($name, $arguments): Result
61 {
62 if($name == 'deletebyfilter')
63 {
64 $r = $this->checkFieldsAdd($arguments['fields']);
65 }
66 else
67 {
68 $r = parent::checkArguments($name, $arguments);
69 }
70
71 return $r;
72 }
73
74 public function internalizeArguments($name, $arguments): array
75 {
76 if($name == 'deletebyfilter')
77 {
78 $fields = $arguments['fields'];
79 if(!empty($fields))
80 $arguments['fields'] = $this->internalizeFieldsAdd($fields);
81 }
82 else
83 {
84 parent::internalizeArguments($name, $arguments);
85 }
86
87 return $arguments;
88 }
89}
internalizeFieldsAdd($fields, $fieldsInfo=[])
Definition base.php:153