1 | <?php |
||
17 | class HtmlButton extends HtmlSemDoubleElement { |
||
18 | use LabeledIconTrait; |
||
19 | |||
20 | /** |
||
21 | * Constructs an HTML Semantic button |
||
22 | * @param string $identifier HTML id |
||
23 | * @param string $value value of the Button |
||
24 | * @param string $cssStyle btn-default, btn-primary... |
||
25 | * @param string $onClick JS Code for click event |
||
26 | */ |
||
27 | public function __construct($identifier, $value=null, $cssStyle=null, $onClick=null) { |
||
28 | parent::__construct($identifier, "button", "ui button"); |
||
29 | $this->content=$value; |
||
30 | if (isset($cssStyle)) { |
||
31 | $this->setStyle($cssStyle); |
||
32 | } |
||
33 | if (isset($onClick)) { |
||
34 | $this->onClick($onClick); |
||
35 | } |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * Set the button value |
||
40 | * @param string $value |
||
41 | * @return HtmlButton |
||
42 | */ |
||
43 | public function setValue($value) { |
||
47 | |||
48 | /** |
||
49 | * define the button style |
||
50 | * @param string|int $cssStyle |
||
51 | * @return HtmlButton default : "" |
||
52 | */ |
||
53 | public function setStyle($cssStyle) { |
||
56 | |||
57 | public function setFocusable($value=true) { |
||
65 | |||
66 | public function setAnimated($content, $animation="") { |
||
78 | |||
79 | /** |
||
80 | * |
||
81 | * @param string|HtmlIcon $icon |
||
82 | * @return HtmlButton |
||
83 | */ |
||
84 | public function asIcon($icon) { |
||
93 | |||
94 | public function asSubmit() { |
||
98 | |||
99 | /** |
||
100 | * Add and return a button label |
||
101 | * @param string $label |
||
102 | * @param boolean $before |
||
103 | * @param string $icon |
||
104 | * @return HtmlLabel |
||
105 | */ |
||
106 | public function addLabel($label, $before=false, $icon=NULL) { |
||
122 | |||
123 | /* |
||
124 | * (non-PHPdoc) |
||
125 | * @see \Ajax\common\html\BaseHtml::fromArray() |
||
126 | */ |
||
127 | public function fromArray($array) { |
||
134 | |||
135 | /** |
||
136 | * hint towards a positive consequence |
||
137 | * @return HtmlButton |
||
138 | */ |
||
139 | public function setPositive() { |
||
142 | |||
143 | public function setColor($color){ |
||
154 | |||
155 | /** |
||
156 | * hint towards a negative consequence |
||
157 | * @return HtmlButton |
||
158 | */ |
||
159 | public function setNegative() { |
||
162 | |||
163 | /** |
||
164 | * formatted to toggle on/off |
||
165 | * @return HtmlButton |
||
166 | */ |
||
167 | public function setToggle() { |
||
171 | |||
172 | /** |
||
173 | * |
||
174 | * @return HtmlButton |
||
175 | */ |
||
176 | public function setCircular() { |
||
179 | |||
180 | /** |
||
181 | * button is less pronounced |
||
182 | * @return HtmlButton |
||
183 | */ |
||
184 | public function setBasic() { |
||
187 | |||
188 | public function setEmphasis($value) { |
||
191 | |||
192 | public function setLoading() { |
||
195 | |||
196 | /** |
||
197 | * Returns a new social Button |
||
198 | * @param string $identifier |
||
199 | * @param string $social |
||
200 | * @param string $value |
||
201 | * @return HtmlButton |
||
202 | */ |
||
203 | public static function social($identifier, $social, $value=NULL) { |
||
210 | |||
211 | /** |
||
212 | * Returns a new labeled Button |
||
213 | * @param string $identifier |
||
214 | * @param string $value |
||
215 | * @param string $icon |
||
216 | * @param boolean $before |
||
217 | * @return \Ajax\semantic\html\elements\HtmlButton |
||
218 | */ |
||
219 | public static function labeled($identifier, $value, $icon, $before=true) { |
||
224 | |||
225 | /** |
||
226 | * Returns a new icon Button |
||
227 | * @param string $identifier |
||
228 | * @param string $icon |
||
229 | * @return HtmlButton |
||
230 | */ |
||
231 | public static function icon($identifier, $icon) { |
||
236 | |||
237 | /** |
||
238 | * {@inheritDoc} |
||
239 | * @see HtmlSemDoubleElement::asLink() |
||
240 | */ |
||
241 | public function asLink($href=NULL,$target=NULL) { |
||
245 | |||
246 | /** |
||
247 | * Returns a button with a dropdown button |
||
248 | * @param string $identifier |
||
249 | * @param string $value |
||
250 | * @param array $items |
||
251 | * @param boolean $asCombo |
||
252 | * @param string $icon |
||
253 | * @return HtmlButtonGroups |
||
254 | */ |
||
255 | public static function dropdown($identifier,$value,$items=[],$asCombo=false,$icon=null){ |
||
262 | } |
||
263 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.