20 parent::__construct(
$identifier,
"div", $baseClass);
21 $this->content=[
"content"=>
new HtmlViewContent(
"content-".$this->identifier)];
27 if (\is_array($value)) {
35 $this->content[
"content"]->setContent(
$content);
42 $count=\sizeof($this->content);
44 $result->setClass($baseClass);
49 if (\array_key_exists($key, $this->content) ===
false) {
50 $this->content[$key]=[];
53 $this->content[$key]->addElement($element);
55 $this->content[$key][]=$element;
59 public function addIcon($icon,$before=
true){
64 public function addHeader($header, $niveau=4, $type=
"page") {
66 $header=
new HtmlHeader(
"header-" . $this->identifier, $niveau, $header, $type);
73 $image=
new HtmlImage(
"image-" . $this->identifier, $image, $title);
75 $image->setClass(
"ui image");
76 return $this->content[
"image"]= $image;
80 $reveal=$visibleContent;
82 $reveal=
new HtmlReveal(
"reveral-" . $this->identifier, $visibleContent, $hiddenContent, $type, $attributeType);
84 return $this->content[$key]= $reveal;
88 $reveal=$visibleContent;
92 return $this->content[
"image"]= $reveal;
106 public function addContentButtons($elements=array(), $asIcons=
false,$part=
"extra",$before=
false){
107 return $this->content[
"content"]->addContentButtons($elements,$asIcons,$part, $before);
113 return $this->content[
"content"]->addHeaderContent($header, $metas, $description,$extra);
117 $count=\sizeof($this->content);
122 return $this->getPart(
"content",null,
true);
126 return $this->getPart(
"extra-content");
130 return $this->getPart(
"image");
134 return $this->getPart(
"header");
145 return parent::compile($js, $view);
148 public function asLink($href=
"",$target=NULL) {
__construct($identifier, $baseClass, $content=NULL)
addRevealImage($visibleContent, $hiddenContent=NULL, $type=RevealType::FADE, $attributeType=NULL)
static getValue($array, $key, $pos)
addImage($image, $title="")
addToProperty($name, $value, $separator=" ")
setProperty($name, $value)
Semantic Image component.
addContentButtons($elements=array(), $asIcons=false, $part="extra", $before=false)
addIcon($icon, $before=true)
addReveal($visibleContent, $hiddenContent=NULL, $type=RevealType::FADE, $attributeType=NULL, $key="extra-content")
addHeader($header, $niveau=4, $type="page")
asLink($href="", $target=NULL)
compile(JsUtils $js=NULL, &$view=NULL)
Base class for Semantic double elements.
addExtraContent($content=array())
addItemContent($content=array())
addItemHeaderContent($header, $metas=array(), $description=NULL, $extra=NULL)
addElementIn($key, $element)
createContent($content, $baseClass="content")
static sortAssociative($array, $sortedKeys=array())