3declare(strict_types=1);
35 string $a_postvar =
""
39 $this->
lng = $DIC->language();
49 $this->options[$a_value] = array(
"value" => $a_value,
50 "txt" => $a_text,
"html" => $a_html);
55 return $this->options;
58 public function setValue(
string $a_value): void
60 $this->value = $a_value;
70 $this->setValue($a_values[$this->getPostVar()] ??
"");
77 if ($this->getRequired() && trim($this->
str($this->getPostVar())) ==
"") {
78 $this->setAlert(
$lng->txt(
"msg_input_is_required"));
86 return $this->
str($this->getPostVar());
92 $selection->setFormSelectMode(
101 $selection->setId($this->getPostVar());
103 $selection->setSelectedValue($this->
getValue());
104 $selection->setUseImages(
false);
107 foreach ($this->getOptions() as $option) {
117 if ($this->
getValue() == $option[
"value"]) {
118 $selection->setListTitle($option[
"txt"]);
126 $selection = $this->getAdvSelection();
128 $a_tpl->
setVariable(
"PROP_GENERIC", $selection->getHTML());
134 return $this->getAdvSelection()->getOnloadCode();
setVariable($variable, $value='')
Sets a variable value.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const ON_ITEM_CLICK_FORM_SELECT
special template class to simplify handling of ITX/PEAR
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc