Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
button.php
1<?
2
4
5
8
9
14class Button
15{
16 protected $id = "";
17 protected $name = "";
18 protected $type = "";
19 protected $class = "";
20 protected $text = "";
24 protected $onchange;
25 protected $title = "";
26
27 public function __construct()
28 {
29 $this->type = Types::BUTTON;
30 $this->id = 'panel_control_'.uniqid();
31 }
32
33
39 public function setTitle($title = "")
40 {
41 $this->title = $title;
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 "TEXT" => $this->text,
117 "TITLE" => $this->title,
118 "ONCHANGE" => $this->onchange->toArray()
119 );
120
121 return $result;
122 }
123}
setOnchange(Snippet\Onchange $onchange)
Definition button.php:99