phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
HtmlTabItem.php
Go to the documentation of this file.
1<?php
2
4
8
15
16 public function __construct($identifier, $caption="", $href="#") {
17 parent::__construct($identifier, "li");
18 $this->_template='<%tagName% id="%identifier%" %properties%>%content%</%tagName%>';
19 $this->content=new HtmlLink("link-".$identifier);
20 $this->content->setHref($href);
21 $this->content->setContent($caption);
22 $this->setProperty("role", "presentation");
23 }
24
25 public function setHref($value) {
26 $this->content->setHref($value);
27 }
28
29 public function setContent($value) {
30 $this->content->setContent($value);
31 }
32
33 /*
34 * (non-PHPdoc)
35 * @see \Ajax\bootstrap\html\HtmlDoubleElement::run()
36 */
37 public function run(JsUtils $js) {
38 $this->_bsComponent=$js->bootstrap()->tab("#".$this->identifier);
39 $this->addEventsOnRun($js);
41 }
42
43 public function getHref() {
44 return $this->content->getHref();
45 }
46
47 /*
48 * (non-PHPdoc)
49 * @see \Ajax\bootstrap\html\HtmlSingleElement::fromArray()
50 */
51 public function fromArray($array) {
52 if (array_key_exists("href", $array)) {
53 $this->setHref($array ["href"]);
54 unset($array ["key"]);
55 }
56 return parent::fromArray($array);
57 }
58
59 /* (non-PHPdoc)
60 * @see \Ajax\bootstrap\html\base\BaseWidget::setIdentifier()
61 */
62 public function setIdentifier($identifier) {
63 parent::setIdentifier($identifier);
64 if($this->content instanceof HtmlLink){
65 $this->content->setIdentifier("link-".$identifier);
66 }
67 }
68 public function setActive($value=true){
69 $this->setProperty("class", ($value)?"active":"");
70 }
71
72 public function disable(){
73 $this->setProperty("class", "disabled");
74 }
75}
JQuery PHP library.
Definition JsUtils.php:23
bootstrap(Bootstrap $bootstrap=NULL)
getter or setter of the Twitter Bootstrap variable
Definition JsUtils.php:140
Inner element for Twitter Bootstrap HTML Dropdown component.
run(JsUtils $js)
SimpleExtComponent\Ajax\common\html\BaseHtmlrun()\Ajax\common\html\BaseHtmlrun()
__construct($identifier, $caption="", $href="#")