phpMv  -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
HtmlSticky.php
Go to the documentation of this file.
1 <?php
2 
4 
6 use Ajax\JsUtils;
7 
9 
10  public function __construct($identifier,$context=NULL,$content=NULL) {
11  parent::__construct($identifier, "div", "ui sticky", $content);
12  if(isset($content))
13  $this->setContext($context);
14  }
15 
16  public function setContext($context){
17  $this->_params["context"]=$context;
18  return $this;
19  }
20 
21  public function setFixed($value=NULL){
22  $fixed="fixed";
23  if(isset($value))
24  $fixed.=" ".$value;
25  return $this->addToProperty("class",$fixed);
26  }
27 
28  public function setBound($value=NULL){
29  $bound="bound";
30  if(isset($value))
31  $bound.=" ".$value;
32  return $this->addToProperty("class",$bound);
33  }
34 
39  public function run(JsUtils $js){
40  parent::run($js);
41  return $js->semantic()->sticky("#".$this->identifier,$this->_params);
42  }
43 
44  public function setOffset($offset=0){
45  $this->_params["offset"]=$offset;
46  return $this;
47  }
48 
49 
50 
51  public function setDebug($verbose=NULL){
52  $this->_params["debug"]=true;
53  if(isset($verbose))
54  $this->_params["verbose"]=true;
55  return $this;
56  }
57 }
addToProperty($name, $value, $separator=" ")
__construct($identifier, $context=NULL, $content=NULL)
Definition: HtmlSticky.php:10
semantic(Semantic $semantic=NULL)
getter or setter of the Semantic-UI variable
Definition: JsUtils.php:159
Base class for Semantic double elements.
JQuery PHP library.
Definition: JsUtils.php:23