Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
basevaluable.php
1
<?php
2
namespace
Bitrix\Report\VisualConstructor\Fields\Valuable
;
3
4
use
Bitrix\Report\VisualConstructor\Fields\Base
;
5
10
abstract
class
BaseValuable
extends
Base
11
{
12
private
$value;
13
private
$defaultValue;
14
private
$name;
15
21
public
function
__construct
($key)
22
{
23
$this->
setKey
($key);
24
}
25
29
public
function
getDefaultValue
()
30
{
31
return
$this->defaultValue;
32
}
33
40
public
function
setDefaultValue
($defaultValue)
41
{
42
$this->defaultValue = $defaultValue;
43
}
44
45
51
public
function
getValue
()
52
{
53
return
$this->value !==
null
? $this->value : $this->
getDefaultValue
();
54
}
55
62
public
function
setValue
($value)
63
{
64
$this->value = $this->
normalise
($value);
65
}
66
70
public
function
getName
()
71
{
72
return
$this->name ===
null
? $this->
getKey
() : $this->name;
73
}
74
81
public
function
setName
($name)
82
{
83
$this->name = $name;
84
}
85
86
93
protected
function
normalise
($config)
94
{
95
return
$config;
96
}
97
101
public
function
getId
()
102
{
103
$id = parent::getId();
104
if
($id ===
null
)
105
{
106
$id = str_replace(
']['
,
'_'
, $this->
getName
());
107
$id = str_replace(
'['
,
'_'
, $id);
108
$id = str_replace(
']'
,
''
, $id);
109
}
110
111
return
$id;
112
}
113
}
Bitrix\Report\VisualConstructor\Fields\Base
Definition
base.php:12
Bitrix\Report\VisualConstructor\Fields\Base\setKey
setKey($key)
Definition
base.php:395
Bitrix\Report\VisualConstructor\Fields\Base\getKey
getKey()
Definition
base.php:384
Bitrix\Report\VisualConstructor\Fields\Valuable\BaseValuable
Definition
basevaluable.php:11
Bitrix\Report\VisualConstructor\Fields\Valuable\BaseValuable\getId
getId()
Definition
basevaluable.php:101
Bitrix\Report\VisualConstructor\Fields\Valuable\BaseValuable\normalise
normalise($config)
Definition
basevaluable.php:93
Bitrix\Report\VisualConstructor\Fields\Valuable\BaseValuable\setName
setName($name)
Definition
basevaluable.php:81
Bitrix\Report\VisualConstructor\Fields\Valuable\BaseValuable\setDefaultValue
setDefaultValue($defaultValue)
Definition
basevaluable.php:40
Bitrix\Report\VisualConstructor\Fields\Valuable\BaseValuable\getName
getName()
Definition
basevaluable.php:70
Bitrix\Report\VisualConstructor\Fields\Valuable\BaseValuable\setValue
setValue($value)
Definition
basevaluable.php:62
Bitrix\Report\VisualConstructor\Fields\Valuable\BaseValuable\getValue
getValue()
Definition
basevaluable.php:51
Bitrix\Report\VisualConstructor\Fields\Valuable\BaseValuable\__construct
__construct($key)
Definition
basevaluable.php:21
Bitrix\Report\VisualConstructor\Fields\Valuable\BaseValuable\getDefaultValue
getDefaultValue()
Definition
basevaluable.php:29
Bitrix\Report\VisualConstructor\Fields\Valuable
Definition
basevaluable.php:2
modules
report
lib
visualconstructor
fields
valuable
basevaluable.php
Создано системой
1.10.0