56 if (in_array($a_orientation,
59 $this->orientation = $a_orientation;
70 return $this->orientation;
80 $this->containerclass = $a_containerclass;
90 return $this->containerclass;
100 $this->icontainerclass = $a_containerclass;
110 return $this->icontainerclass;
120 $this->headerclass = $a_headerclass;
130 return $this->headerclass;
140 $this->contentclass = $a_contentclass;
150 return $this->contentclass;
160 $this->contentwidth = $a_contentwidth;
170 return $this->contentwidth;
180 $this->contentheight = $a_contentheight;
190 return $this->contentheight;
200 $this->behaviour = $a_val;
210 return $this->behaviour;
220 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
225 $tpl->addJavaScript(
"./Services/Accordion/js/accordion.js",
true, 3);
235 $tpl->addCss(
"./Services/Accordion/css/accordion.css");
243 $this->items[] = array(
"header" => $a_header,
244 "content" => $a_content);
262 self::$accordion_cnt++;
282 $this->addJavascript();
285 $tpl =
new ilTemplate(
"tpl.accordion.html",
true,
true,
"Services/Accordion");
286 foreach ($this->
getItems() as $item)
288 $tpl->setCurrentBlock(
"item");
289 $tpl->setVariable(
"HEADER", $item[
"header"]);
290 $tpl->setVariable(
"CONTENT", $item[
"content"]);
295 $tpl->setVariable(
"OR_SHORT", $or_short);
303 $tpl->setVariable(
"HEIGHT",
"height:".$height.
"px;");
307 $tpl->setVariable(
"HHEIGHT",
"height:".$height.
"px;");
309 $tpl->parseCurrentBlock();
312 $tpl->setVariable(
"CNT", self::$accordion_cnt);
318 include_once(
"./Services/Accordion/classes/class.ilAccordionPropertiesStorage.php");
320 $ctab = $stor->getProperty($this->
getId(), $ilUser->getId(),
322 $tpl->setVariable(
"BEHAVIOUR", $ctab);
323 $tpl->setVariable(
"SAVE_URL",
"./ilias.php?baseClass=ilaccordionpropertiesstorage&cmd=setOpenedTab".
324 "&accordion_id=".$this->
getId().
"&user_id=".$ilUser->getId());
330 $tpl->setVariable(
"OR2_SHORT", $or_short);
333 $tpl->setVariable(
"WIDTH", $width);
337 $tpl->setVariable(
"WIDTH",
"null");
341 $tpl->setVariable(
"CWIDTH",
'style="width:'.$width.
'px;"');