1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
answertypes.php
См. документацию.
1
<?php
8
namespace
Bitrix\Vote;
9
use \Bitrix\Main\Localization\Loc;
10
11
Loc::loadMessages(__FILE__);
12
13
class
AnswerTypes
14
{
15
const
RADIO
= 0;
16
const
CHECKBOX
= 1;
17
const
DROPDOWN
= 2;
18
const
MULTISELECT
= 3;
19
const
TEXT
= 4;
20
const
TEXTAREA
= 5;
21
26
public
static
function
getFullList
()
27
{
28
$res
= (new \ReflectionClass(__CLASS__))->getConstants();
29
$result
=
array
();
30
foreach
(
$res
as
$code
=> $id)
31
{
32
$result
[] =
array
(
"ID"
=> $id,
"CODE"
=>
$code
,
"TITLE"
=> Loc::getMessage(
"VOTE_ANSWER_TYPE_"
.
$code
));
33
}
34
return
$result
;
35
}
36
41
public
static
function
getTitledList
()
42
{
43
$res
= (new \ReflectionClass(__CLASS__))->getConstants();
44
$result
=
array
();
45
foreach
(
$res
as
$code
=> $id)
46
{
47
$result
[$id] = Loc::getMessage(
"VOTE_ANSWER_TYPE_"
.
$code
);
48
}
49
return
$result
;
50
}
51
57
public
static
function
getTitleById
($id)
58
{
59
$res
= array_flip((
new
\ReflectionClass(__CLASS__))->getConstants());
60
$val
= $id;
61
if
(array_key_exists($id,
$res
))
62
{
63
$val
= Loc::getMessage(
"VOTE_ANSWER_TYPE_"
.
$res
[$id]);
64
}
65
return
$val
;
66
}
67
}
Bitrix\Vote\AnswerTypes
Определения
answertypes.php:14
Bitrix\Vote\AnswerTypes\CHECKBOX
const CHECKBOX
Определения
answertypes.php:16
Bitrix\Vote\AnswerTypes\TEXT
const TEXT
Определения
answertypes.php:19
Bitrix\Vote\AnswerTypes\getTitledList
static getTitledList()
Определения
answertypes.php:41
Bitrix\Vote\AnswerTypes\RADIO
const RADIO
Определения
answertypes.php:15
Bitrix\Vote\AnswerTypes\getTitleById
static getTitleById($id)
Определения
answertypes.php:57
Bitrix\Vote\AnswerTypes\getFullList
static getFullList()
Определения
answertypes.php:26
Bitrix\Vote\AnswerTypes\DROPDOWN
const DROPDOWN
Определения
answertypes.php:17
Bitrix\Vote\AnswerTypes\TEXTAREA
const TEXTAREA
Определения
answertypes.php:20
Bitrix\Vote\AnswerTypes\MULTISELECT
const MULTISELECT
Определения
answertypes.php:18
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
answertypes.php
Создано системой
1.14.0