Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
dropdown.php
1
<?php
2
3
namespace
Bitrix\Report\VisualConstructor\Fields\Valuable
;
4
5
use
Bitrix\Main\Localization\Loc
;
6
11
class
DropDown
extends
BaseValuable
12
{
13
const
JS_EVENT_ON_CHANGE
=
'onChange'
;
14
private
$options = array();
15
21
public
function
__construct
($key)
22
{
23
parent::__construct($key);
24
$options = $this->
getDefaultOptions
();
25
$this->
setOptions
($options);
26
$this->
setLabel
(
'Select: '
);
27
$this->
setDefaultValue
(
'__'
);
28
}
29
30
36
public
function
printContent
()
37
{
38
$this->
includeFieldComponent
(
'baseselect'
);
39
}
40
41
45
public
function
getDefaultOptions
()
46
{
47
return
array(
'__'
=>
Loc::getMessage
(
'REPORT_DROP_DOWN_DEFAULT_VALUE_TITLE'
));
48
}
49
57
public
function
addOption
($key, $value)
58
{
59
$this->options[$key] = $value;
60
return
$this;
61
}
62
69
public
function
addOptions
($options)
70
{
71
foreach
($options as $key => $value)
72
{
73
$this->options[$key] = $value;
74
}
75
}
79
public
function
getOptions
()
80
{
81
return
$this->options;
82
}
83
90
public
function
setOptions
($options)
91
{
92
$this->options = $options;
93
}
94
95
}
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Report\VisualConstructor\Fields\Base\includeFieldComponent
includeFieldComponent($templateName, $params=array())
Definition
base.php:530
Bitrix\Report\VisualConstructor\Fields\Base\setLabel
setLabel($label)
Definition
base.php:243
Bitrix\Report\VisualConstructor\Fields\Valuable\BaseValuable
Definition
basevaluable.php:11
Bitrix\Report\VisualConstructor\Fields\Valuable\BaseValuable\setDefaultValue
setDefaultValue($defaultValue)
Definition
basevaluable.php:40
Bitrix\Report\VisualConstructor\Fields\Valuable\DropDown
Definition
dropdown.php:12
Bitrix\Report\VisualConstructor\Fields\Valuable\DropDown\JS_EVENT_ON_CHANGE
const JS_EVENT_ON_CHANGE
Definition
dropdown.php:13
Bitrix\Report\VisualConstructor\Fields\Valuable\DropDown\getOptions
getOptions()
Definition
dropdown.php:79
Bitrix\Report\VisualConstructor\Fields\Valuable\DropDown\printContent
printContent()
Definition
dropdown.php:36
Bitrix\Report\VisualConstructor\Fields\Valuable\DropDown\setOptions
setOptions($options)
Definition
dropdown.php:90
Bitrix\Report\VisualConstructor\Fields\Valuable\DropDown\addOptions
addOptions($options)
Definition
dropdown.php:69
Bitrix\Report\VisualConstructor\Fields\Valuable\DropDown\getDefaultOptions
getDefaultOptions()
Definition
dropdown.php:45
Bitrix\Report\VisualConstructor\Fields\Valuable\DropDown\__construct
__construct($key)
Definition
dropdown.php:21
Bitrix\Report\VisualConstructor\Fields\Valuable\DropDown\addOption
addOption($key, $value)
Definition
dropdown.php:57
Bitrix\Report\VisualConstructor\Fields\Valuable
Definition
basevaluable.php:2
modules
report
lib
visualconstructor
fields
valuable
dropdown.php
Создано системой
1.10.0