Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
checkbox.php
1<?
2
4
5
8
9
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
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}
setOnchange(Snippet\Onchange $onchange)
Definition checkbox.php:99