1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
answertypes.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 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}
const CHECKBOX
Определения answertypes.php:16
const TEXT
Определения answertypes.php:19
static getTitledList()
Определения answertypes.php:41
const RADIO
Определения answertypes.php:15
static getTitleById($id)
Определения answertypes.php:57
static getFullList()
Определения answertypes.php:26
const DROPDOWN
Определения answertypes.php:17
const TEXTAREA
Определения answertypes.php:20
const MULTISELECT
Определения answertypes.php:18
</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