1 | <?php |
||
14 | class Option extends Nette\Object |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * @var ColumnStatus |
||
19 | */ |
||
20 | protected $columnStatus; |
||
21 | |||
22 | /** |
||
23 | * @var mixed |
||
24 | */ |
||
25 | protected $value; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $text; |
||
31 | |||
32 | /** |
||
33 | * @var string|callable |
||
34 | */ |
||
35 | protected $title; |
||
36 | |||
37 | /** |
||
38 | * @var string|callable |
||
39 | */ |
||
40 | protected $class = 'btn-success'; |
||
41 | |||
42 | /** |
||
43 | * @var string |
||
44 | */ |
||
45 | protected $class_secondary = 'btn btn-xs'; |
||
46 | |||
47 | /** |
||
48 | * @var string |
||
49 | */ |
||
50 | protected $class_in_dropdown = 'ajax'; |
||
51 | |||
52 | /** |
||
53 | * @var string|callable |
||
54 | */ |
||
55 | protected $icon; |
||
56 | |||
57 | |||
58 | /** |
||
59 | * [__construct description] |
||
60 | * @param ColumnStatus $columnStatus |
||
61 | * @param mixed $value |
||
62 | * @param string $text |
||
63 | */ |
||
64 | public function __construct(ColumnStatus $columnStatus, $value, $text) |
||
70 | |||
71 | |||
72 | /** |
||
73 | * @return mixed |
||
74 | */ |
||
75 | public function getValue() |
||
79 | |||
80 | |||
81 | /** |
||
82 | * End option fluent interface and return parent |
||
83 | * @return ColumnStatus |
||
84 | */ |
||
85 | public function endOption() |
||
89 | |||
90 | |||
91 | /** |
||
92 | * @param string $title |
||
93 | * @return static |
||
94 | */ |
||
95 | public function setTitle($title) |
||
101 | |||
102 | |||
103 | /** |
||
104 | * @return string |
||
105 | */ |
||
106 | public function getTitle() |
||
110 | |||
111 | |||
112 | /** |
||
113 | * @param string $class |
||
114 | * @param string $class_secondary |
||
115 | * @return static |
||
116 | */ |
||
117 | public function setClass($class, $class_secondary = NULL) |
||
127 | |||
128 | |||
129 | /** |
||
130 | * @return string |
||
131 | */ |
||
132 | public function getClass() |
||
136 | |||
137 | |||
138 | /** |
||
139 | * @param string $class_secondary |
||
140 | */ |
||
141 | public function setClassSecondary($class_secondary) |
||
145 | |||
146 | |||
147 | /** |
||
148 | * @return string |
||
149 | */ |
||
150 | public function getClassSecondary() |
||
154 | |||
155 | |||
156 | /** |
||
157 | * @param string $class_in_dropdown |
||
158 | */ |
||
159 | public function setClassInDropdown($class_in_dropdown) |
||
163 | |||
164 | |||
165 | /** |
||
166 | * @return string |
||
167 | */ |
||
168 | public function getClassInDropdown() |
||
172 | |||
173 | |||
174 | /** |
||
175 | * @param string $icon |
||
176 | * @return static |
||
177 | */ |
||
178 | public function setIcon($icon) |
||
184 | |||
185 | |||
186 | /** |
||
187 | * @return string |
||
188 | */ |
||
189 | public function getIcon() |
||
193 | |||
194 | |||
195 | /** |
||
196 | * @return string |
||
197 | */ |
||
198 | public function getText() |
||
202 | |||
203 | } |
||
204 |