Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
enum.php
1<?php
2
3
5
6
11
12class Enum extends ControllerBase
13{
14 public function getRelationTypesAction()
15 {
16 $r=[];
17 foreach(RelationType::getAllDescriptions() as $id=>$name)
18 {
19 $r[] = ['ID'=>RelationType::resolveName($id), 'NAME'=>$name];
20 }
21 return ['ENUM'=>$r];
22 }
23
25 {
26 $r=[];
28 {
29 $r[] = ['ID'=>BusinessValuePersonDomainType::resolveName($id), 'NAME'=>$name];
30 }
31 return ['ENUM'=>$r];
32 }
33
35 {
36 $messages = Loc::loadLanguageFile($_SERVER["DOCUMENT_ROOT"].'/bitrix/modules/sale/admin/pay_system_edit.php');
37
38 $r[] = ['ID'=>'N', 'NAME'=>$messages['SPS_IS_CASH_TYPE_NO_CASH']];
39 $r[] = ['ID'=>'Y', 'NAME'=>$messages['SPS_IS_CASH_TYPE_CASH']];
40 $r[] = ['ID'=>'A', 'NAME'=>$messages['SPS_IS_CASH_TYPE_ACQUIRING']];
41
42 return ['ENUM'=>$r];
43 }
44
45 public function getPropertyTypesAction()
46 {
47 $r = [];
48 $property = new Property();
49
50 foreach ($property->getTypes()['ENUM'] as $name=>$description)
51 {
52 if($name == 'LOCATION')
53 continue;
54 if($name == 'FILE')
55 continue;
56
57 $r[$name] = $description;
58
59 }
60 return ['ENUM'=>$r];
61 }
62
63 public function getStatusTypesAction()
64 {
65 $messages = Loc::loadLanguageFile($_SERVER["DOCUMENT_ROOT"].'/bitrix/modules/sale/admin/status_edit.php');
66
67 $r[] = ['ID'=>'O', 'NAME'=>$messages['SSEN_TYPE_O']];
68 $r[] = ['ID'=>'D', 'NAME'=>$messages['SSEN_TYPE_D']];
69
70 return ['ENUM'=>$r];
71 }
72
73 protected function checkPermissionEntity($name, $arguments=[])
74 {
75 return new Result();
76 }
77}
static loadLanguageFile($file, $language=null, $normalize=true)
Definition loc.php:224
getBusinessValuePersonDomainTypesAction()
Definition enum.php:24
checkPermissionEntity($name, $arguments=[])
Definition enum.php:73