phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
HtmlSlider.php
Go to the documentation of this file.
1<?php
3
6
17
18 protected $_paramParts=array();
19 public function __construct($identifier, $content='') {
20 parent::__construct($identifier, 'div','ui slider');
21 }
22
23 public function setLabeled(){
24 return $this->addClass('labeled');
25 }
26
27 public function setTicked(){
28 if(!$this->propertyContains('class', 'labeled')){
29 $this->addClass('labeled');
30 }
31 return $this->addClass('ticked');
32 }
33
34 public function setLabels($labels){
35 $this->_params['interpretLabel']=$labels;
36 return $this;
37 }
38
43 public function asRange($values=NULL){
44 $this->addClass('range');
45 if(\is_array($values)){
46 $this->_params=\array_merge($this->_params,$values);
47 }
48 return $this;
49 }
50
55 public function setValues($values=NULL){
56 if(\is_array($values)){
57 $this->_params=\array_merge($this->_params,$values);
58 }
59 return $this;
60 }
61
62 public function setReversed($value=true){
63 if($value){
64 $this->addClass('reversed');
65 }
66 return $this;
67 }
68
69 public function setVertical($value=true){
70 if($value){
71 $this->addClass('vertical');
72 }
73 return $this;
74 }
75
76 /*
77 * (non-PHPdoc)
78 * @see BaseHtml::run()
79 */
80 public function run(JsUtils $js) {
81 if(isset($this->_bsComponent)===false){
82 $this->_bsComponent=$js->semantic()->slider('#'.$this->identifier,$this->_params,$this->_paramParts);
83 }
84 $this->addEventsOnRun($js);
86 }
87}
88
JQuery PHP library.
Definition JsUtils.php:23
semantic(Semantic $semantic=NULL)
getter or setter of the Semantic-UI variable
Definition JsUtils.php:158
Base class for Semantic double elements.
Ajax\semantic\html\modules$HtmlSlider This class is part of phpMv-ui.
asRange($values=NULL)
$values is an associative array with keys (min,max,start,end,step,smooth)
run(JsUtils $js)
{{SimpleExtComponent\Ajax\common\html\BaseHtmlrun()\Ajax\common\html\BaseHtmlrun()}HtmlDoubleElement:...
setValues($values=NULL)
$values is an associative array with keys (min,max,start,step,smooth)
__construct($identifier, $content='')