47 $next_class = $ilCtrl->getNextClass($this);
48 $cmd = $ilCtrl->getCmd();
60 $this->type = $a_type;
80 $this->title = $a_title;
100 $this->postvar = $a_postvar;
120 $id = str_replace(
"[",
"__", $this->
getPostVar());
121 $id = str_replace(
"]",
"__", $id);
133 $this->info = $a_info;
153 $this->alert = $a_alert;
173 $this->required = $a_required;
193 $this->disabled = $a_disabled;
203 return $this->disabled;
243 $this->parent_gui = $a_val;
253 return $this->parent_gui;
281 $this->hidden_title = $a_val;
314 return serialize($this->getValue());
322 $data = unserialize($a_data);
326 $this->setValue(
$data);
330 $this->setValue(
false);
340 if (!is_object($parent))
342 die(
"You must set parent for ".get_class($this).
" to use serialize feature.");
354 if (!is_object($parent))
356 die(
"You must set parent for ".get_class($this).
" to use serialize feature.");
367 if (!is_object($parent))
369 die(
"You must set parent for ".get_class($this).
" to use serialize feature.");
387 public function setMulti($a_multi, $a_sortable =
false, $a_addremove =
true)
391 trigger_error(
"not supported for form property type", E_USER_WARNING);
394 $this->multi = (bool)$a_multi;
395 $this->multi_sortable = (bool)$a_sortable;
396 $this->multi_addremove = (bool)$a_addremove;
416 $this->multi_values = array_unique($a_values);
441 $tpl =
new ilTemplate(
"tpl.multi_icons.html",
true,
true,
"Services/Form");
444 if ($this->multi_addremove)
446 $tpl->setCurrentBlock(
"addremove");
447 $tpl->setVariable(
"ID", $id);
448 $tpl->setVariable(
"TXT_ADD", $lng->txt(
"add"));
449 $tpl->setVariable(
"TXT_REMOVE", $lng->txt(
"remove"));
450 include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
453 $tpl->parseCurrentBlock();
456 if ($this->multi_sortable)
459 $tpl->setCurrentBlock(
"sortable");
460 $tpl->setVariable(
"ID", $id);
461 $tpl->setVariable(
"TXT_DOWN", $lng->txt(
"down"));
462 $tpl->setVariable(
"TXT_UP", $lng->txt(
"up"));
463 include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
466 $tpl->parseCurrentBlock();
491 return str_replace(
"\x0B",
"", $a_text);
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
static get($a_glyph, $a_text="")
Get glyph html.
special template class to simplify handling of ITX/PEAR
Interface for multi values support.