1 | 2 | simandl | <?php |
2 | | | |
3 | | | namespace Phem\Libraries\UI\Model; |
4 | | | |
5 | | | /** |
6 | | | * @author Jakub PetrĹžĂlka <petrzilka@czweb.net> |
7 | | | */ |
8 | | | class Label extends Control |
9 | | | { |
10 | | | /** |
11 | | | * |
12 | | | * @\Phem\Libraries\UI\Annotations\ContentAttr(name="label") |
13 | | | */ |
14 | | | private $text; |
15 | | | private $alignment; |
16 | | | |
17 | | | /** |
18 | | | * |
19 | | | * @\Phem\Libraries\UI\Annotations\StyleAttr(name="color") |
20 | | | */ |
21 | | | private $color; |
22 | | | |
23 | | | /** @var Control */ |
24 | | | private $targetControl; |
25 | | | |
26 | | | public function getText() |
27 | | | { |
28 | | | return $this->text; |
29 | | | } |
30 | | | |
31 | | | protected function setText($text) |
32 | | | { |
33 | | | $this->text = $text; |
34 | | | } |
35 | | | |
36 | | | public function getValue() |
37 | | | { |
38 | | | return $this->getText(); |
39 | | | } |
40 | | | |
41 | | | protected function setValue($value) |
42 | | | { |
43 | | | $this->setText($value); |
44 | | | } |
45 | | | |
46 | | | public function getAlignment() |
47 | | | { |
48 | | | return $this->alignment; |
49 | | | } |
50 | | | |
51 | | | protected function setAlignment($alignment) |
52 | | | { |
53 | | | $this->alignment = $alignment; |
54 | | | } |
55 | | | |
56 | | | public function getColor() |
57 | | | { |
58 | | | return $this->color; |
59 | | | } |
60 | | | |
61 | | | protected function setColor($color) |
62 | | | { |
63 | | | $this->color = $color; |
64 | | | } |
65 | | | |
66 | | | /** |
67 | | | * @return Control |
68 | | | */ |
69 | | | public function getTargetControl() |
70 | | | { |
71 | | | return $this->targetControl; |
72 | | | } |
73 | | | |
74 | | | protected function setTargetControl(Control $targetControl) |
75 | | | { |
76 | | | $this->targetControl = $targetControl; |
77 | | | } |
78 | | | |
79 | | | } |