phpMv  -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
ContentPartTrait.php
Go to the documentation of this file.
1 <?php
4 
9 trait ContentPartTrait{
10  public function addElementInPart($element,$partKey,$before=false,$force=false){
11  $part=$this->getPart($partKey,null,$force);
12  if($part instanceof HtmlSemDoubleElement){
13  $this->content[$partKey]=$part;
14  $part->addContent($element,$before);
15  }
16  return $this;
17  }
18 
19  public function getPart($partKey, $index=NULL,$force=false) {
20  if (\array_key_exists($partKey, $this->content)) {
21  if (isset($index))
22  return $this->content[$partKey][$index];
23  return $this->content[$partKey];
24  }
25  if($force){
26  return new HtmlSemDoubleElement($partKey."-".$this->identifier,"div",$partKey);
27  }
28  return NULL;
29  }
30 }
Base class for Semantic double elements.