phpMv
-UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
HtmlMenuItem.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ajax\semantic\html\content
;
4
5
use
Ajax\service\JArray
;
6
use
Ajax\semantic\html\base\traits\MenuItemTrait
;
7
use
Ajax\semantic\html\base\HtmlSemDoubleElement
;
8
9
class
HtmlMenuItem
extends
HtmlSemDoubleElement
,
MenuItemTrait
{
10
public
function
__construct
(
$identifier
,
$content
) {
11
parent::__construct(
$identifier
,
"div"
,
"item"
,
$content
);
12
}
13
14
protected
function
initContent
(
$content
){
15
if
(\is_array(
$content
)){
16
if
(JArray::isAssociative(
$content
)===
false
){
17
$icon=@
$content
[0];
18
$title=@
$content
[1];
19
}
else
{
20
$icon=@
$content
[
"icon"
];
21
$title=@
$content
[
"title"
];
22
}
23
if
(isset($icon)){
24
$this->
addIcon
($icon);
25
}
26
if
(isset($title)){
27
$this->
setTitle
($title);
28
}
29
}
else
{
30
$this->
setContent
(
$content
);
31
}
32
}
33
}
Ajax\common\html\BaseWidget\$identifier
$identifier
Definition
BaseWidget.php:14
Ajax\common\html\HtmlDoubleElement\$content
$content
Definition
HtmlDoubleElement.php:14
Ajax\common\html\HtmlSingleElement\setTitle
setTitle($value)
Definition
HtmlSingleElement.php:36
Ajax\semantic\html\base\HtmlSemDoubleElement
Base class for Semantic double elements.
Definition
HtmlSemDoubleElement.php:23
Ajax\semantic\html\base\traits\MenuItemTrait
Definition
MenuItemTrait.php:17
Ajax\semantic\html\base\traits\MenuItemTrait\setContent
setContent($content)
Definition
MenuItemTrait.php:22
Ajax\semantic\html\base\traits\MenuItemTrait\addIcon
addIcon($icon, $before=true)
Ajax\semantic\html\content\HtmlMenuItem
Definition
HtmlMenuItem.php:9
Ajax\semantic\html\content\HtmlMenuItem\initContent
initContent($content)
Definition
HtmlMenuItem.php:14
Ajax\semantic\html\content\HtmlMenuItem\__construct
__construct($identifier, $content)
Definition
HtmlMenuItem.php:10
Ajax\service\JArray
Definition
JArray.php:4
Ajax\semantic\html\content
Definition
HtmlAbsractItem.php:3
Ajax
semantic
html
content
HtmlMenuItem.php
Generated on Sun Dec 10 2023 16:16:06 for
phpMv-UI
by
doxygen
1.9.8