47 $this->ctrl = $DIC->ctrl();
48 $this->lng = $DIC->language();
61 $next_class =
$ilCtrl->getNextClass($this);
94 $this->title = $a_title;
114 $this->postvar = $a_postvar;
135 $id = str_replace(
"]",
"__",
$id);
147 $this->
info = $a_info;
167 $this->alert = $a_alert;
187 $this->required = $a_required;
207 $this->disabled = $a_disabled;
217 return $this->disabled;
257 $this->parent_gui = $a_val;
267 return $this->parent_gui;
295 $this->hidden_title = $a_val;
327 return serialize($this->getValue());
335 $data = unserialize($a_data);
338 $this->setValue(
$data);
340 $this->setValue(
false);
350 if (!is_object($parent)) {
351 die(
"You must set parent for " . get_class($this) .
" to use serialize feature.");
363 if (!is_object($parent)) {
364 die(
"You must set parent for " . get_class($this) .
" to use serialize feature.");
375 if (!is_object($parent)) {
376 die(
"You must set parent for " . get_class($this) .
" to use serialize feature.");
394 public function setMulti($a_multi, $a_sortable =
false, $a_addremove =
true)
397 require_once
'Services/Form/exceptions/class.ilFormException.php';
399 "%s not supported for form property type %s",
405 $this->multi = (bool) $a_multi;
406 $this->multi_sortable = (bool) $a_sortable;
407 $this->multi_addremove = (bool) $a_addremove;
427 $this->multi_values = array_unique($a_values);
452 $tpl =
new ilTemplate(
"tpl.multi_icons.html",
true,
true,
"Services/Form");
455 if ($this->multi_addremove) {
456 $tpl->setCurrentBlock(
"addremove");
458 $tpl->setVariable(
"TXT_ADD",
$lng->txt(
"add"));
459 $tpl->setVariable(
"TXT_REMOVE",
$lng->txt(
"remove"));
460 include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
463 $tpl->parseCurrentBlock();
466 if ($this->multi_sortable) {
467 $tpl->setCurrentBlock(
"sortable");
469 $tpl->setVariable(
"TXT_DOWN",
$lng->txt(
"down"));
470 $tpl->setVariable(
"TXT_UP",
$lng->txt(
"up"));
471 include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
474 $tpl->parseCurrentBlock();
498 return str_replace(
"\x0B",
"", $a_text);
510 if ($str != $a_str) {
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
if(!array_key_exists('StateId', $_REQUEST)) $id
static get($a_glyph, $a_text="")
Get glyph html.
special template class to simplify handling of ITX/PEAR
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Interface for multi values support.