19 parent::__construct(
$identifier,
"div", $baseClass);
20 $this->content=[
"content"=>
new HtmlViewContent(
"content-".$this->identifier)];
26 if (\is_array($value)) {
27 $image=JArray::getValue($value,
"image", 0);
28 $content=JArray::getValue($value,
"content", 1);
29 $extra=JArray::getValue($value,
"extra", 2);
34 $this->content[
"content"]->setContent(
$content);
41 $count=\sizeof($this->content);
43 $result->setClass($baseClass);
48 if (\array_key_exists($key, $this->content) ===
false) {
49 $this->content[$key]=[];
52 $this->content[$key]->addElement($element);
54 $this->content[$key][]=$element;
58 public function addIcon($icon,$before=
true){
63 public function addHeader($header, $niveau=4, $type=
"page") {
65 $header=
new HtmlHeader(
"header-" . $this->identifier, $niveau, $header, $type);
72 $image=
new HtmlImage(
"image-" . $this->identifier, $image, $title);
74 $image->setClass(
"ui image");
75 return $this->content[
"image"]= $image;
79 $reveal=$visibleContent;
81 $reveal=
new HtmlReveal(
"reveral-" . $this->identifier, $visibleContent, $hiddenContent, $type, $attributeType);
83 return $this->content[$key]= $reveal;
87 $reveal=$visibleContent;
91 return $this->content[
"image"]= $reveal;
105 public function addContentButtons($elements=array(), $asIcons=
false,$part=
"extra",$before=
false){
106 return $this->content[
"content"]->addContentButtons($elements,$asIcons,$part, $before);
112 return $this->content[
"content"]->addHeaderContent($header, $metas, $description,$extra);
116 $count=\sizeof($this->content);
121 return $this->
getPart(
"content",
null,
true);
125 return $this->
getPart(
"extra-content");
129 return $this->
getPart(
"image");
133 return $this->
getPart(
"header");
143 $this->content=JArray::sortAssociative($this->content, [
"header",
"image",
"icon",
"content",
"extra-content"]);
144 return parent::compile($js, $view);
147 public function asLink($href=
"",$target=NULL) {
Base class for Semantic double elements.
addToProperty($name, $value, $separator=" ")
setProperty($name, $value)
getPart($partKey, $index=NULL, $force=false)
asLink($href="", $target=NULL)
Transforms the element into a link.
createContent($content, $baseClass="content")
__construct($identifier, $baseClass, $content=NULL)
addExtraContent($content=array())
addItemContent($content=array())
addImage($image, $title="")
addItemHeaderContent($header, $metas=array(), $description=NULL, $extra=NULL)
addHeader($header, $niveau=4, $type="page")
addIcon($icon, $before=true)
compile(JsUtils $js=NULL, &$view=NULL)
{}BaseHtml::compile()
addElementIn($key, $element)
addRevealImage($visibleContent, $hiddenContent=NULL, $type=RevealType::FADE, $attributeType=NULL)
addContentButtons($elements=array(), $asIcons=false, $part="extra", $before=false)
addReveal($visibleContent, $hiddenContent=NULL, $type=RevealType::FADE, $attributeType=NULL, $key="extra-content")
Semantic Image component.