1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
questiontypes.php
См. документацию.
1<?php
8namespace Bitrix\Vote;
9use \Bitrix\Main\Localization\Loc;
10
11Loc::loadMessages(__FILE__);
12
14{
15 const RADIO = 0;
16 const CHECKBOX = 1;
17 const DROPDOWN = 2;
18 const MULTISELECT = 3;
19 const COMPATIBILITY = 99999;
20
25 public static function getValues()
26 {
27 $res = (new \ReflectionClass(__CLASS__))->getConstants();
28 return array_values($res);
29 }
30
34 public static function getList()
35 {
36 $res = (new \ReflectionClass(__CLASS__))->getConstants();
37 $result = array();
38 foreach ($res as $code => $id)
39 {
40 $result[$id] = Loc::getMessage("VOTE_QUESTION_TYPE_".$code);
41 }
42 return $result;
43 }
44
48 public static function getFullList()
49 {
50 $res = (new \ReflectionClass(__CLASS__))->getConstants();
51 $result = array();
52 foreach ($res as $code => $id)
53 {
54 $result[] = array("ID" => $id, "CODE" => $code, "TITLE" => Loc::getMessage("VOTE_QUESTION_TYPE_".$code));
55 }
56 return $result;
57 }
58
62 public static function getTitledList()
63 {
64 $res = (new \ReflectionClass(__CLASS__))->getConstants();
65 $result = array();
66 foreach ($res as $code => $id)
67 {
68 $result[$id] = Loc::getMessage("VOTE_QUESTION_TYPE_".$code);
69 }
70 return $result;
71 }
72
78 public static function getTitleById($id)
79 {
80 $res = array_flip((new \ReflectionClass(__CLASS__))->getConstants());
81 $val = $id;
82 if (array_key_exists($id, $res))
83 {
84 $val = Loc::getMessage("VOTE_QUESTION_TYPE_".$res[$id]);
85 }
86 return $val;
87 }
88}
const CHECKBOX
Определения questiontypes.php:16
static getValues()
Определения questiontypes.php:25
static getTitledList()
Определения questiontypes.php:62
const COMPATIBILITY
Определения questiontypes.php:19
const RADIO
Определения questiontypes.php:15
static getTitleById($id)
Определения questiontypes.php:78
static getFullList()
Определения questiontypes.php:48
const DROPDOWN
Определения questiontypes.php:17
const MULTISELECT
Определения questiontypes.php:18
static getList()
Определения questiontypes.php:34
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$res
Определения filter_act.php:7
$result
Определения get_property_values.php:14
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения options.php:195
$val
Определения options.php:1793