Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
statuslang.php
1<?php
2
3
5
6
10
11class StatusLang extends Base
12{
13 public function getFields()
14 {
15 return [
16 'STATUS_ID'=>[
17 'TYPE'=>DataType::TYPE_STRING,
18 'ATTRIBUTES'=>[
19 Attributes::REQUIRED,
20 Attributes::IMMUTABLE,
21 ]
22 ],
23 'LID'=>[
24 'TYPE'=>DataType::TYPE_STRING,
25 'ATTRIBUTES'=>[
26 Attributes::REQUIRED,
27 Attributes::IMMUTABLE,
28 ]
29 ],
30 'NAME'=>[
31 'TYPE'=>DataType::TYPE_STRING,
32 'ATTRIBUTES'=>[Attributes::REQUIRED]
33 ],
34 'DESCRIPTION'=>[
35 'TYPE'=>DataType::TYPE_STRING
36 ]
37 ];
38 }
39
40 public function convertKeysToSnakeCaseArguments($name, $arguments)
41 {
42 if($name == 'deletebyfilter')
43 {
44 if(isset($arguments['fields']))
45 {
46 $fields = $arguments['fields'];
47 if(!empty($fields))
48 $arguments['fields'] = $this->convertKeysToSnakeCaseFields($fields);
49 }
50 }
51 else
52 {
53 $arguments = parent::convertKeysToSnakeCaseArguments($name, $arguments);
54 }
55
56 return $arguments;
57 }
58
59 public function checkArguments($name, $arguments): Result
60 {
61 if($name == 'deletebyfilter')
62 {
63 $r = $this->checkFieldsAdd($arguments['fields']);
64 }
65 else
66 {
67 $r = parent::checkArguments($name, $arguments);
68 }
69
70 return $r;
71 }
72
73 public function internalizeArguments($name, $arguments): array
74 {
75 if($name == 'getlistlangs'){}
76 elseif($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
90 public function externalizeResult($name, $fields): array
91 {
92 if($name == 'getlistlangs'){}
93 else
94 {
95 parent::externalizeResult($name, $fields);
96 }
97 return $fields;
98 }
99}
internalizeFieldsAdd($fields, $fieldsInfo=[])
Definition base.php:153
internalizeArguments($name, $arguments)
convertKeysToSnakeCaseArguments($name, $arguments)
checkArguments($name, $arguments)