phpMv
-UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
HtmlAccordionItem.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ajax\semantic\html\content
;
4
5
use
Ajax\semantic\html\base\HtmlSemDoubleElement
;
6
use
Ajax\semantic\html\elements\HtmlIcon
;
7
use
Ajax\JsUtils
;
8
9
10
11
class
HtmlAccordionItem
extends
HtmlSemDoubleElement
{
12
protected
$titleElement
;
13
protected
$_icon
=
"dropdown"
;
14
protected
$_title
;
15
protected
$_active
;
16
17
public
function
__construct
(
$identifier
, $title,
$content
=NULL) {
18
parent::__construct(
$identifier
,
"div"
,
"content"
,
$content
);
19
$this->_template=
"%titleElement%"
.$this->_template;
20
$this->_title=$title;
21
}
22
23
public
function
setTitle
($title){
24
$this->_title=$title;
25
}
26
27
public
function
setIcon
($icon){
28
$this->_icon=$icon;
29
}
30
31
protected
function
createTitleElement
(){
32
$element=
new
HtmlSemDoubleElement
(
"title-"
.$this->identifier,
"div"
,
"title"
);
33
$element->setContent(array(
new
HtmlIcon
(
""
, $this->_icon),$this->_title));
34
if
($this->_active===
true
)
35
$element->addToProperty(
"class"
,
"active"
);
36
return
$element;
37
}
38
39
public
function
compile
(
JsUtils
$js=NULL, &$view=NULL){
40
$this->titleElement=$this->
createTitleElement
();
41
return
parent::compile($js,$view);
42
}
43
44
public
function
setActive
($value=
true
){
45
$this->_active=$value;
46
if
($value===
true
)
47
$this->
addToPropertyCtrl
(
"class"
,
"active"
, array(
"active"
));
48
else
49
$this->
removePropertyValue
(
"class"
,
"active"
);
50
return
$this;
51
}
52
}
Ajax\JsUtils
JQuery PHP library.
Definition
JsUtils.php:23
Ajax\common\html\BaseWidget\$identifier
$identifier
Definition
BaseWidget.php:14
Ajax\common\html\HtmlDoubleElement\$content
$content
Definition
HtmlDoubleElement.php:14
Ajax\common\html\traits\BaseHtmlPropertiesTrait\removePropertyValue
removePropertyValue($name, $value)
Definition
BaseHtmlPropertiesTrait.php:68
Ajax\semantic\html\base\HtmlSemDoubleElement
Base class for Semantic double elements.
Definition
HtmlSemDoubleElement.php:23
Ajax\semantic\html\base\traits\BaseTrait\addToPropertyCtrl
addToPropertyCtrl($name, $value, $typeCtrl)
Ajax\semantic\html\content\HtmlAccordionItem
Definition
HtmlAccordionItem.php:11
Ajax\semantic\html\content\HtmlAccordionItem\$titleElement
$titleElement
Definition
HtmlAccordionItem.php:12
Ajax\semantic\html\content\HtmlAccordionItem\setIcon
setIcon($icon)
Definition
HtmlAccordionItem.php:27
Ajax\semantic\html\content\HtmlAccordionItem\setActive
setActive($value=true)
show it is currently the active user selection
Definition
HtmlAccordionItem.php:44
Ajax\semantic\html\content\HtmlAccordionItem\$_title
$_title
Definition
HtmlAccordionItem.php:14
Ajax\semantic\html\content\HtmlAccordionItem\__construct
__construct($identifier, $title, $content=NULL)
Definition
HtmlAccordionItem.php:17
Ajax\semantic\html\content\HtmlAccordionItem\setTitle
setTitle($title)
Definition
HtmlAccordionItem.php:23
Ajax\semantic\html\content\HtmlAccordionItem\$_icon
$_icon
Definition
HtmlAccordionItem.php:13
Ajax\semantic\html\content\HtmlAccordionItem\compile
compile(JsUtils $js=NULL, &$view=NULL)
{{}BaseHtml::compile()}
Definition
HtmlAccordionItem.php:39
Ajax\semantic\html\content\HtmlAccordionItem\createTitleElement
createTitleElement()
Definition
HtmlAccordionItem.php:31
Ajax\semantic\html\content\HtmlAccordionItem\$_active
$_active
Definition
HtmlAccordionItem.php:15
Ajax\semantic\html\elements\HtmlIcon
Semantic Icon component.
Definition
HtmlIcon.php:14
Ajax\semantic\html\content
Definition
HtmlAbsractItem.php:3
Ajax
semantic
html
content
HtmlAccordionItem.php
Generated on Sun Dec 10 2023 16:16:06 for
phpMv-UI
by
doxygen
1.9.8