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 
4 
8 
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 }
Base class for Semantic double elements.
static isAssociative($array)
Definition: JArray.php:6
addIcon($icon, $before=true)
Definition: BaseTrait.php:92