1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
questiontypes.php
См. документацию.
1
<?php
8
namespace
Bitrix\Vote;
9
use \Bitrix\Main\Localization\Loc;
10
11
Loc::loadMessages(__FILE__);
12
13
class
QuestionTypes
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
}
Bitrix\Vote\QuestionTypes
Определения
questiontypes.php:14
Bitrix\Vote\QuestionTypes\CHECKBOX
const CHECKBOX
Определения
questiontypes.php:16
Bitrix\Vote\QuestionTypes\getValues
static getValues()
Определения
questiontypes.php:25
Bitrix\Vote\QuestionTypes\getTitledList
static getTitledList()
Определения
questiontypes.php:62
Bitrix\Vote\QuestionTypes\COMPATIBILITY
const COMPATIBILITY
Определения
questiontypes.php:19
Bitrix\Vote\QuestionTypes\RADIO
const RADIO
Определения
questiontypes.php:15
Bitrix\Vote\QuestionTypes\getTitleById
static getTitleById($id)
Определения
questiontypes.php:78
Bitrix\Vote\QuestionTypes\getFullList
static getFullList()
Определения
questiontypes.php:48
Bitrix\Vote\QuestionTypes\DROPDOWN
const DROPDOWN
Определения
questiontypes.php:17
Bitrix\Vote\QuestionTypes\MULTISELECT
const MULTISELECT
Определения
questiontypes.php:18
Bitrix\Vote\QuestionTypes\getList
static getList()
Определения
questiontypes.php:34
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$res
$res
Определения
filter_act.php:7
$result
$result
Определения
get_property_values.php:14
$code
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения
options.php:195
$val
$val
Определения
options.php:1793
bitrix
modules
vote
lib
questiontypes.php
Создано системой
1.14.0