Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
labelfield.php
1
<?php
2
3
namespace
Bitrix\Report\VisualConstructor\Fields\Valuable
;
4
5
use
Bitrix\Main\Localization\Loc
;
6
11
class
LabelField
extends
BaseValuable
12
{
13
private
$mode;
14
const
JS_EVENT_ON_CHANGE
=
'onChange'
;
15
22
public
function
__construct
($key, $mode =
'small'
)
23
{
24
parent::__construct($key);
25
$this->
setLabel
(
Loc::getMessage
(
'REPORT_DEFAULT_LABEL_OF_LABEL_FIELD'
));
26
$this->
setDefaultValue
(
'Title default Value'
);
27
$this->
setMode
($mode);
28
}
29
30
36
public
function
printContent
()
37
{
38
switch
($this->
getMode
())
39
{
40
case
'small'
:
41
$this->
includeFieldComponent
(
'label'
);
42
break
;
43
case
'big'
:
44
$this->
includeFieldComponent
(
'biglabel'
);
45
break
;
46
default
:
47
$this->
includeFieldComponent
(
'label'
);
48
}
49
}
50
54
public
function
getMode
()
55
{
56
return
$this->mode;
57
}
58
65
public
function
setMode
($mode)
66
{
67
$this->mode = $mode;
68
}
69
70
71
}
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\LabelField
Definition
labelfield.php:12
Bitrix\Report\VisualConstructor\Fields\Valuable\LabelField\JS_EVENT_ON_CHANGE
const JS_EVENT_ON_CHANGE
Definition
labelfield.php:14
Bitrix\Report\VisualConstructor\Fields\Valuable\LabelField\printContent
printContent()
Definition
labelfield.php:36
Bitrix\Report\VisualConstructor\Fields\Valuable\LabelField\getMode
getMode()
Definition
labelfield.php:54
Bitrix\Report\VisualConstructor\Fields\Valuable\LabelField\setMode
setMode($mode)
Definition
labelfield.php:65
Bitrix\Report\VisualConstructor\Fields\Valuable\LabelField\__construct
__construct($key, $mode='small')
Definition
labelfield.php:22
Bitrix\Report\VisualConstructor\Fields\Valuable
Definition
basevaluable.php:2
modules
report
lib
visualconstructor
fields
valuable
labelfield.php
Создано системой
1.10.0