16 parent::__construct(
$identifier,
"div",
"content",[]);
21 if (\is_array($value)) {
36 $count=\sizeof($this->content);
38 $result->setClass($baseClass);
44 if (\array_key_exists(
"meta", $this->content) ===
false) {
45 $this->content[
"meta"]=
new HtmlSemDoubleElement(
"meta-" . $this->identifier,
"div",
"meta", array ());
49 $value->setFloated($direction);
51 $this->content[
"meta"]->addContent($value);
52 return $this->content[
"meta"];
56 if (\array_key_exists(
"extra", $this->content) ===
false) {
57 $this->content[
"extra"]=
new HtmlSemDoubleElement(
"extra-" . $this->identifier,
"div",
"extra", array ());
59 $this->content[
"extra"]->addContent($value);
60 return $this->content[
"extra"];
63 public function addImage($src=
"", $alt=
"", $size=NULL) {
64 $image=
new HtmlImg(
"img-", $src, $alt);
66 $image->setSize($size);
67 $this->content[
'image']=$image;
78 public function addContentButtons($elements=array(), $asIcons=
false,$part=
"extra",$before=
false){
79 $buttons=
new HtmlButtonGroups(
"buttons-".$this->identifier,$elements,$asIcons);
80 $this->addElementInPart($buttons,$part, $before,
true);
85 if (\is_array($metas)) {
86 foreach ( $metas as $meta ) {
96 if (isset($caption)) {
98 $result->addIcon($icon);
104 $result->setFloated($direction);
116 $result->setFloated($direction);
123 foreach ( $icons as $icon ) {
133 if (isset($description)) {
134 $this->
addElement($description,
"description");
143 return parent::compile($js, $view);
static getValue($array, $key, $pos)
addContentIcon($icon, $caption=NULL, $direction=Direction::LEFT)
__construct($identifier, $content=array())
addHeaderContent($header, $metas=array(), $description=NULL, $extra=NULL)
addContent($content, $before=false)
compile(JsUtils $js=NULL, &$view=NULL)
addContentText($caption, $direction=Direction::LEFT)
addElement($content, $baseClass="")
addMeta($value, $direction=Direction::LEFT)
addContentButtons($elements=array(), $asIcons=false, $part="extra", $before=false)
Base class for Semantic double elements.
addContentIcons($icons, $direction=Direction::LEFT)
addImage($src="", $alt="", $size=NULL)
addIcon($icon, $before=true)