Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
checkbox.php
1
<?
2
3
namespace
Bitrix\Main\Grid\Panel\Snippet
;
4
5
6
use
Bitrix\Main\Grid\Panel\Snippet
;
7
use
Bitrix\Main\Grid\Panel\Types
;
8
9
14
class
Checkbox
15
{
16
protected
$id
=
""
;
17
protected
$type
=
""
;
18
protected
$name
=
""
;
19
protected
$class
=
""
;
20
protected
$text
=
""
;
24
protected
$onchange
;
25
protected
$value
=
""
;
26
27
public
function
__construct
()
28
{
29
$this->type =
Types::CHECKBOX
;
30
$this->
id
=
'panel_control_'
.uniqid();
31
}
32
33
39
public
function
setValue
(
$value
=
""
)
40
{
41
$this->value =
$value
;
42
return
$this;
43
}
44
45
51
public
function
setId
(
$id
=
""
)
52
{
53
$this->
id
=
$id
;
54
return
$this;
55
}
56
57
63
public
function
setName
(
$name
=
""
)
64
{
65
$this->name =
$name
;
66
return
$this;
67
}
68
69
75
public
function
setClass
(
$class
=
""
)
76
{
77
$this->
class
=
$class
;
78
return
$this;
79
}
80
81
87
public
function
setText
(
$text
=
""
)
88
{
89
$this->text =
$text
;
90
return
$this;
91
}
92
93
99
public
function
setOnchange
(
Snippet
\
Onchange
$onchange
)
100
{
101
$this->onchange =
$onchange
;
102
return
$this;
103
}
104
105
109
public
function
toArray
()
110
{
111
$result = array(
112
"TYPE"
=> $this->type,
113
"ID"
=> $this->
id
,
114
"NAME"
=> $this->name,
115
"CLASS"
=> $this->
class
,
116
"LABEL"
=> $this->text,
117
"VALUE"
=> $this->value,
118
"ONCHANGE"
=> $this->onchange->toArray()
119
);
120
121
return
$result;
122
}
123
}
Bitrix\Main\Grid\Panel\Snippet\Checkbox
Definition
checkbox.php:15
Bitrix\Main\Grid\Panel\Snippet\Checkbox\__construct
__construct()
Definition
checkbox.php:27
Bitrix\Main\Grid\Panel\Snippet\Checkbox\$value
$value
Definition
checkbox.php:25
Bitrix\Main\Grid\Panel\Snippet\Checkbox\$class
$class
Definition
checkbox.php:19
Bitrix\Main\Grid\Panel\Snippet\Checkbox\setOnchange
setOnchange(Snippet\Onchange $onchange)
Definition
checkbox.php:99
Bitrix\Main\Grid\Panel\Snippet\Checkbox\setValue
setValue($value="")
Definition
checkbox.php:39
Bitrix\Main\Grid\Panel\Snippet\Checkbox\toArray
toArray()
Definition
checkbox.php:109
Bitrix\Main\Grid\Panel\Snippet\Checkbox\setName
setName($name="")
Definition
checkbox.php:63
Bitrix\Main\Grid\Panel\Snippet\Checkbox\$type
$type
Definition
checkbox.php:17
Bitrix\Main\Grid\Panel\Snippet\Checkbox\$onchange
$onchange
Definition
checkbox.php:24
Bitrix\Main\Grid\Panel\Snippet\Checkbox\setId
setId($id="")
Definition
checkbox.php:51
Bitrix\Main\Grid\Panel\Snippet\Checkbox\$name
$name
Definition
checkbox.php:18
Bitrix\Main\Grid\Panel\Snippet\Checkbox\setClass
setClass($class="")
Definition
checkbox.php:75
Bitrix\Main\Grid\Panel\Snippet\Checkbox\$text
$text
Definition
checkbox.php:20
Bitrix\Main\Grid\Panel\Snippet\Checkbox\setText
setText($text="")
Definition
checkbox.php:87
Bitrix\Main\Grid\Panel\Snippet\Checkbox\$id
$id
Definition
checkbox.php:16
Bitrix\Main\Grid\Panel\Snippet\Onchange
Definition
onchange.php:15
Bitrix\Main\Grid\Panel\Snippet
Definition
snippet.php:19
Bitrix\Main\Grid\Panel\Types
Definition
types.php:12
Bitrix\Main\Grid\Panel\Types\CHECKBOX
const CHECKBOX
Definition
types.php:14
Bitrix\Main\Grid\Panel\Snippet
Definition
button.php:3
modules
main
lib
grid
panel
snippet
checkbox.php
Создано системой
1.10.0