Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
document.php
1<?php
2
4
9
10final class Document extends Base
11{
17 public function getFields()
18 {
19 $result = [
20 'ID' => [
21 'TYPE' => DataType::TYPE_INT,
22 'ATTRIBUTES' => [
23 Attributes::READONLY,
24 ],
25 ],
26 'DOC_TYPE' => [
27 'TYPE' => DataType::TYPE_CHAR,
28 'ATTRIBUTES' => [
29 Attributes::IMMUTABLE,
30 Attributes::REQUIRED,
31 ],
32 ],
33 'SITE_ID' => [
34 'TYPE' => DataType::TYPE_CHAR,
35 ],
36 'RESPONSIBLE_ID' => [
37 'TYPE' => DataType::TYPE_INT,
38 'ATTRIBUTES' => [
39 Attributes::REQUIRED_ADD,
40 ],
41 ],
42 'DATE_MODIFY' => [
43 'TYPE' => DataType::TYPE_DATETIME,
44 ],
45 'DATE_CREATE' => [
46 'TYPE' => DataType::TYPE_DATETIME,
47 'ATTRIBUTES' => [
48 Attributes::IMMUTABLE,
49 ],
50 ],
51 'CREATED_BY' => [
52 'TYPE' => DataType::TYPE_INT,
53 'ATTRIBUTES' => [
54 Attributes::IMMUTABLE,
55 ],
56 ],
57 'MODIFIED_BY' => [
58 'TYPE' => DataType::TYPE_INT,
59 ],
60 'CURRENCY' => [
61 'TYPE' => DataType::TYPE_CHAR,
62 'ATTRIBUTES' => [
63 Attributes::REQUIRED,
64 Attributes::IMMUTABLE,
65 ],
66 ],
67 'STATUS' => [
68 'TYPE' => DataType::TYPE_CHAR,
69 'ATTRIBUTES' => [
70 Attributes::READONLY,
71 ],
72 ],
73 'DATE_STATUS' => [
74 'TYPE' => DataType::TYPE_DATETIME,
75 'ATTRIBUTES' => [
76 Attributes::READONLY,
77 ],
78 ],
79 'DATE_DOCUMENT' => [
80 'TYPE' => DataType::TYPE_DATETIME,
81 ],
82 'STATUS_BY' => [
83 'TYPE' => DataType::TYPE_INT,
84 ],
85 'TOTAL' => [
86 'TYPE' => DataType::TYPE_FLOAT,
87 ],
88 'COMMENTARY' => [
89 'TYPE' => DataType::TYPE_CHAR,
90 ],
91 'TITLE' => [
92 'TYPE' => DataType::TYPE_STRING,
93 ],
94 'DOC_NUMBER' => [
95 'TYPE' => DataType::TYPE_STRING,
96 ],
97 ];
98
99 if (!Manager::isActiveProviderExists())
100 {
101 $result['CONTRACTOR_ID'] = [
102 'TYPE' => DataType::TYPE_INT,
103 ];
104 }
105
106 return $result;
107 }
108
112 public function internalizeArguments($name, $arguments): array
113 {
114 $name = mb_strtolower($name);
115 if (!in_array($name, ['fields', 'conductlist', 'cancellist', 'deletelist', 'confirm', 'unconfirm', 'conduct', 'cancel'], true))
116 {
117 return parent::internalizeArguments($name, $arguments);
118 }
119
120 return $arguments;
121 }
122
123
127 public function externalizeResult($name, $fields): array
128 {
129 $name = mb_strtolower($name);
130 if (!in_array($name, ['fields', 'conductlist', 'cancellist', 'deletelist', 'confirm', 'unconfirm', 'conduct', 'cancel'], true))
131 {
132 return parent::externalizeResult($name, $fields);
133 }
134
135 return $fields;
136 }
137}
internalizeArguments($name, $arguments)
Definition document.php:112
externalizeResult($name, $fields)
Definition document.php:127