Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
rangeconfig.php
1
<?php
2
3
namespace
Bitrix\Main\Grid\Column\Editable
;
4
5
use
Bitrix\Main\Grid\Editor\Types
;
6
7
class
RangeConfig
extends
Config
8
{
9
private
?
float
$min;
10
private
?
float
$max;
11
private
?
float
$step;
12
19
public
function
__construct
(
string
$name, ?
float
$min =
null
, ?
float
$max =
null
, ?
float
$step =
null
)
20
{
21
parent::__construct($name, Types::RANGE);
22
23
$this->min = $min;
24
$this->max = $max;
25
$this->step = $step;
26
}
27
35
public
function
setMin
(
float
$value): self
36
{
37
$this->min = $value;
38
39
return
$this;
40
}
41
49
public
function
setMax
(
float
$value): self
50
{
51
$this->max = $value;
52
53
return
$this;
54
}
55
63
public
function
setStep
(
float
$value): self
64
{
65
$this->step = $value;
66
67
return
$this;
68
}
69
73
public
function
toArray
(): array
74
{
75
$result = parent::toArray();
76
77
if
(isset($this->min))
78
{
79
$result[
'DATA'
][
'MIN'
] = $this->min;
80
}
81
82
if
(isset($this->max))
83
{
84
$result[
'DATA'
][
'MAX'
] = $this->max;
85
}
86
87
if
(isset($this->step))
88
{
89
$result[
'DATA'
][
'STEP'
] = $this->step;
90
}
91
92
return
$result;
93
}
94
}
Bitrix\Main\Grid\Column\Editable\RangeConfig
Definition
rangeconfig.php:8
Bitrix\Main\Grid\Column\Editable\RangeConfig\setMin
setMin(float $value)
Definition
rangeconfig.php:35
Bitrix\Main\Grid\Column\Editable\RangeConfig\setStep
setStep(float $value)
Definition
rangeconfig.php:63
Bitrix\Main\Grid\Column\Editable\RangeConfig\toArray
toArray()
Definition
rangeconfig.php:73
Bitrix\Main\Grid\Column\Editable\RangeConfig\setMax
setMax(float $value)
Definition
rangeconfig.php:49
Bitrix\Main\Grid\Column\Editable\RangeConfig\__construct
__construct(string $name, ?float $min=null, ?float $max=null, ?float $step=null)
Definition
rangeconfig.php:19
Bitrix\Main\Grid\Editor\Types
Definition
types.php:11
Bitrix\Main\Config
Definition
configuration.php:2
Bitrix\Main\Grid\Column\Editable
Definition
config.php:3
modules
main
lib
grid
column
editable
rangeconfig.php
Создано системой
1.10.0