phpMv
-UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
ContentPartTrait.php
Go to the documentation of this file.
1
<?php
2
namespace
Ajax\semantic\html\content\view
;
3
use
Ajax\semantic\html\base\HtmlSemDoubleElement
;
4
9
class
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
}
Ajax\semantic\html\base\HtmlSemDoubleElement
Base class for Semantic double elements.
Definition
HtmlSemDoubleElement.php:23
Ajax\semantic\html\content\view\ContentPartTrait
Definition
ContentPartTrait.php:9
Ajax\semantic\html\content\view\ContentPartTrait\getPart
getPart($partKey, $index=NULL, $force=false)
Definition
ContentPartTrait.php:19
Ajax\semantic\html\content\view\ContentPartTrait\addElementInPart
addElementInPart($element, $partKey, $before=false, $force=false)
Definition
ContentPartTrait.php:10
Ajax\semantic\html\content\view
Definition
ContentPartTrait.php:2
Ajax
semantic
html
content
view
ContentPartTrait.php
Generated on Sun Dec 10 2023 16:16:07 for
phpMv-UI
by
doxygen
1.9.8