phpMv  -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Button.php
Go to the documentation of this file.
1 <?php
2 namespace Ajax\ui\components;
3 
5 use Ajax\JsUtils;
7 
14 class Button extends SimpleComponent {
15 
16  public function __construct(JsUtils $js) {
17  parent::__construct($js);
18  $this->uiName = "button";
19  }
20 
28  public function setDisabled($value) {
29  return $this->setParamCtrl("disabled", $value, "is_bool");
30  }
31 
43  public function setIcons($value) {
44  if (is_string($value)) {
45  if (JString::startsWith($value, "{"));
46  $value = "%" . $value . "%";
47  }
48  return $this->setParam("icons", $value);
49  }
50 
59  public function setText($value) {
60  return $this->setParamCtrl("text", $value, "is_bool");
61  }
62 
72  public function setLabel($value) {
73  return $this->setParam("label", $value);
74  }
75 }
__construct(JsUtils $js)
Definition: Button.php:16
setDisabled($value)
Disables the button if set to true.
Definition: Button.php:28
Base component for JQuery UI visuals components.
Composant JQuery UI Button.
Definition: Button.php:14
setText($value)
Whether to show the label.
Definition: Button.php:59
setIcons($value)
Icons to display, with or without text (see text option).
Definition: Button.php:43
JQuery PHP library.
Definition: JsUtils.php:23
setLabel($value)
Text to show in the button.
Definition: Button.php:72
setParamCtrl($key, $value, $typeCtrl)