1 | 2 | simandl | <?php |
2 | | | |
3 | | | namespace Phem\Libraries\UI\Model; |
4 | | | |
5 | | | use Phem\Core\Collection; |
6 | | | |
7 | | | /** |
8 | | | * @author Jakub PetrĹžĂlka <petrzilka@czweb.net> |
9 | | | */ |
10 | | | class Button extends Control |
11 | | | { |
12 | | | |
13 | | | private $text; |
14 | | | private $icon; |
15 | | | private $mainStyle; |
16 | | | private $onClick; |
17 | | | |
18 | | | function __construct($parent) |
19 | | | { |
20 | | | parent::__construct($parent); |
21 | | | $this->onClick = new Collection(); |
22 | | | } |
23 | | | |
24 | | | public function getText() |
25 | | | { |
26 | | | return $this->text; |
27 | | | } |
28 | | | |
29 | | | protected function setText($text) |
30 | | | { |
31 | | | $this->text = $text; |
32 | | | } |
33 | | | |
34 | | | public function getValue() |
35 | | | { |
36 | | | return $this->getText(); |
37 | | | } |
38 | | | |
39 | | | protected function setValue($value) |
40 | | | { |
41 | | | $this->setText($value); |
42 | | | } |
43 | | | |
44 | | | public function getIcon() |
45 | | | { |
46 | | | return $this->icon; |
47 | | | } |
48 | | | |
49 | | | protected function setIcon($icon) |
50 | | | { |
51 | | | $this->icon = $icon; |
52 | | | } |
53 | | | |
54 | | | public function getMainStyle() |
55 | | | { |
56 | | | return $this->mainStyle; |
57 | | | } |
58 | | | |
59 | | | protected function setMainStyle($mainStyle) |
60 | | | { |
61 | | | $this->mainStyle = $mainStyle; |
62 | | | } |
63 | | | |
64 | | | public function OnClick() |
65 | | | { |
66 | | | return $this->onClick; |
67 | | | } |
68 | | | |
69 | | | } |