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
3
namespace
Ajax\bootstrap\html\content
;
4
5
use
Ajax\JsUtils
;
6
use
Ajax\bootstrap\html\HtmlLink
;
7
use
Ajax\bootstrap\html\base\HtmlBsDoubleElement
;
8
14
class
HtmlTabItem
extends
HtmlBsDoubleElement
{
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);
40
return
$this->_bsComponent
;
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
}
Ajax\JsUtils
JQuery PHP library.
Definition
JsUtils.php:23
Ajax\JsUtils\bootstrap
bootstrap(Bootstrap $bootstrap=NULL)
getter or setter of the Twitter Bootstrap variable
Definition
JsUtils.php:140
Ajax\bootstrap\html\HtmlLink
Definition
HtmlLink.php:9
Ajax\bootstrap\html\base\HtmlBsDoubleElement
Definition
HtmlBsDoubleElement.php:10
Ajax\bootstrap\html\content\HtmlTabItem
Inner element for Twitter Bootstrap HTML Dropdown component.
Definition
HtmlTabItem.php:14
Ajax\bootstrap\html\content\HtmlTabItem\setHref
setHref($value)
Definition
HtmlTabItem.php:25
Ajax\bootstrap\html\content\HtmlTabItem\run
run(JsUtils $js)
SimpleExtComponent\Ajax\common\html\BaseHtmlrun()\Ajax\common\html\BaseHtmlrun()
Definition
HtmlTabItem.php:37
Ajax\bootstrap\html\content\HtmlTabItem\setActive
setActive($value=true)
Definition
HtmlTabItem.php:68
Ajax\bootstrap\html\content\HtmlTabItem\disable
disable()
Definition
HtmlTabItem.php:72
Ajax\bootstrap\html\content\HtmlTabItem\fromArray
fromArray($array)
Definition
HtmlTabItem.php:51
Ajax\bootstrap\html\content\HtmlTabItem\setIdentifier
setIdentifier($identifier)
Definition
HtmlTabItem.php:62
Ajax\bootstrap\html\content\HtmlTabItem\getHref
getHref()
Definition
HtmlTabItem.php:43
Ajax\bootstrap\html\content\HtmlTabItem\__construct
__construct($identifier, $caption="", $href="#")
Definition
HtmlTabItem.php:16
Ajax\bootstrap\html\content\HtmlTabItem\setContent
setContent($value)
Definition
HtmlTabItem.php:29
Ajax\common\html\BaseHtml\$_bsComponent
$_bsComponent
Definition
BaseHtml.php:27
Ajax\common\html\BaseWidget\$identifier
$identifier
Definition
BaseWidget.php:14
Ajax\common\html\traits\BaseHtmlEventsTrait\addEventsOnRun
addEventsOnRun(JsUtils $js=NULL)
Definition
BaseHtmlEventsTrait.php:91
Ajax\common\html\traits\BaseHtmlPropertiesTrait\setProperty
setProperty($name, $value)
Definition
BaseHtmlPropertiesTrait.php:30
Ajax\bootstrap\html\content
Definition
HtmlCarouselControl.php:3
Ajax
bootstrap
html
content
HtmlTabItem.php
Generated on Sun Dec 10 2023 16:15:52 for
phpMv-UI
by
doxygen
1.9.8