Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
parametertype.php
1<?php
3
5{
6
12 const GROUP = 13;
16 const SIZE = 3;
17 const IMAGE_SET = 4;
18 const VALUE_SET = 5;
19 const IMAGE = 6;
20 const COLOR = 7;
21 const STRING = 8;
22 const BOOLEAN = 9;
23 const BUTTON_STRETCH = 10;
24 const FILL_LIST = 11;
25 const VALUE_LIST = 12;
26
27 public static function getDesc($type, $paramName = false)
28 {
29 $desc = array();
30 switch ($type)
31 {
32 case self::GROUP:
33 $desc = array("type" => self::getStringType($type));
34 break;
36 $desc = array("type" => self::getStringType($type),
37 "interface" => "background",
38 "primary" => "color",
39 );
40 break;
42 $desc = array(
43 "type" => self::getStringType($type),
44 "interface" => "background_light",
45 "primary" => "color",
46 );
47 break;
49 case self::FILL_LIST:
50 $desc = array(
51 "type" => self::getStringType($type),
52 );
53 break;
54 case self::COLOR:
55 case self::IMAGE:
56 case self::IMAGE_SET:
57 case self::SIZE:
58 case self::VALUE_SET:
59 case self::STRING:
60 case self::BOOLEAN:
61 $desc = array("type" => self::getStringType($type));
62 break;
63 }
64
65 return $desc;
66 }
67
68 public static function getStringType($intType)
69 {
70 switch ($intType)
71 {
74 case self::GROUP:
75 $stringType = "group";
76 break;
78 case self::VALUE_SET:
79 $stringType = "value_set";
80 break;
81 case self::COLOR:
82 $stringType = "color";
83 break;
84 case self::IMAGE:
85 $stringType = "image";
86 break;
87 case self::IMAGE_SET:
88 $stringType = "image_set";
89 break;
90 case self::SIZE:
91 $stringType = "size";
92 break;
93 case self::FILL_LIST:
94 $stringType = "fill_list";
95 break;
97 $stringType = "value_list";
98 break;
99 case self::BOOLEAN:
100 $stringType = "boolean";
101 break;
102 default:
103 $stringType = "string";
104 }
105
106 return $stringType;
107 }
108
109
110}
static getDesc($type, $paramName=false)