phpMv
-UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
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
{
10
use
MenuItemTrait
;
11
public
function
__construct
(
$identifier
,
$content
) {
12
parent::__construct(
$identifier
,
"div"
,
"item"
,
$content
);
13
}
14
15
protected
function
initContent
(
$content
){
16
if
(\is_array(
$content
)){
17
if
(
JArray::isAssociative
(
$content
)===
false
){
18
$icon=@
$content
[0];
19
$title=@
$content
[1];
20
}
else
{
21
$icon=@
$content
[
"icon"
];
22
$title=@
$content
[
"title"
];
23
}
24
if
(isset($icon)){
25
$this->
addIcon
($icon);
26
}
27
if
(isset($title)){
28
$this->
setTitle
($title);
29
}
30
}
else
{
31
$this->
setContent
(
$content
);
32
}
33
}
34
}
Ajax\common\html\HtmlSingleElement\setTitle
setTitle($value)
Definition:
HtmlSingleElement.php:36
Ajax\semantic\html\content\HtmlMenuItem\initContent
initContent($content)
Definition:
HtmlMenuItem.php:15
Ajax\semantic\html\content\HtmlMenuItem
Definition:
HtmlMenuItem.php:9
HtmlSemDoubleElement
Ajax\semantic\html\content\HtmlMenuItem\__construct
__construct($identifier, $content)
Definition:
HtmlMenuItem.php:11
Ajax\semantic\html\content
Definition:
HtmlAbsractItem.php:3
Ajax\common\html\BaseWidget\$identifier
$identifier
Definition:
BaseWidget.php:14
Ajax\semantic\html\base\HtmlSemDoubleElement
Base class for Semantic double elements.
Definition:
HtmlSemDoubleElement.php:23
Ajax\service\JArray\isAssociative
static isAssociative($array)
Definition:
JArray.php:6
Ajax\common\html\HtmlDoubleElement\setContent
setContent($content)
Definition:
HtmlDoubleElement.php:27
Ajax\semantic\html\base\traits\MenuItemTrait
trait MenuItemTrait
Definition:
MenuItemTrait.php:17
Ajax\semantic\html\base\traits\addIcon
addIcon($icon, $before=true)
Definition:
BaseTrait.php:92
Ajax\common\html\HtmlDoubleElement\$content
$content
Definition:
HtmlDoubleElement.php:14
JArray
Ajax
semantic
html
content
HtmlMenuItem.php
Generated on Thu Sep 19 2024 23:26:03 for
phpMv-UI
by
doxygen
1.8.13