1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
persontype.php
См. документацию.
1<?php
2
3
4namespace Bitrix\Sale\Rest\View;
5
6
7use Bitrix\Main\Loader;
8use Bitrix\Rest\Integration\View\Attributes;
9use Bitrix\Rest\Integration\View\DataType;
10use Bitrix\Rest\Integration\View\Base;
11
12class PersonType extends Base
13{
14 public function getFields()
15 {
16 $fieldList = [
17 'ID'=>[
18 'TYPE'=>DataType::TYPE_INT,
19 'ATTRIBUTES'=>[Attributes::READONLY],
20 ],
21 'NAME'=>[
22 'TYPE'=>DataType::TYPE_STRING,
23 'ATTRIBUTES'=>[Attributes::REQUIRED],
24 ],
25 'CODE'=>[
26 'TYPE'=>DataType::TYPE_STRING,
27 ],
28 'SORT'=>[
29 'TYPE'=>DataType::TYPE_STRING,
30 ],
31 'ACTIVE'=>[
32 'TYPE'=>DataType::TYPE_STRING,
33 ],
34 'XML_ID'=>[
35 'TYPE'=>DataType::TYPE_STRING,
36 ]
37 ];
38
39 if (!Loader::includeModule('bitrix24'))
40 {
41 $fieldList['LID'] = [
42 'TYPE'=>DataType::TYPE_STRING,
43 'ATTRIBUTES'=> [Attributes::REQUIRED],
44 ];
45 }
46
47 return $fieldList;
48 }
49}