4include_once 
"./Services/Form/classes/class.ilSubEnabledFormPropertyGUI.php";
 
   29                parent::__construct($a_title, $a_postvar);
 
   40                $this->options = $a_options;
 
   60                $this->value = $a_value;
 
   80                $this->intlink = $a_value;
 
  100                $this->intlinktext = $a_value;
 
  120                $this->addCommand = $a_add_command;
 
  130                return ($this->addCommand) ? $this->addCommand : 
"addInternalLink";
 
  156                        $this->
setAlert($lng->txt(
"msg_input_is_required"));
 
  172                $template = 
new ilTemplate(
"tpl.prop_suggestedsolutionselector.html", TRUE, TRUE, 
"Modules/TestQuestionPool");
 
  174                foreach($this->
getOptions() as $option_value => $option_text)
 
  176                        $template->setCurrentBlock(
"prop_intlink_select_option");
 
  177                        $template->setVariable(
"VAL_SELECT_OPTION", $option_value);
 
  178                        if ($option_value == $this->
getValue())
 
  180                                $template->setVariable(
"CHK_SEL_OPTION",
 
  181                                        'selected="selected"');
 
  183                        $template->setVariable(
"TXT_SELECT_OPTION", $option_text);
 
  184                        $template->parseCurrentBlock();
 
  188                        $template->setCurrentBlock(
"delete_internallink");
 
  189                        $template->setVariable(
"TEXT_DELETE_INTERNALLINK", 
$lng->txt(
"remove_solution"));
 
  190                        $template->setVariable(
"POST_VAR", $this->
getPostVar());
 
  191                        $template->parseCurrentBlock();
 
  192                        $template->setCurrentBlock(
"internal_link");
 
  195                        $template->parseCurrentBlock();
 
  197                $template->setCurrentBlock(
"prop_internallink_selector");
 
  198                $template->setVariable(
"POST_VAR", $this->
getPostVar());
 
  201                        $template->setVariable(
"DISABLED",
 
  202                                " disabled=\"disabled\"");
 
  204                $template->setVariable(
"TEXT_ADD_INTERNALLINK", ($this->
getInternalLink()) ? $lng->txt(
"change") : 
$lng->txt(
"add"));
 
  205                $template->setVariable(
"CMD_ADD_INTERNALLINK", $this->
getAddCommand());
 
  206                $template->parseCurrentBlock();
 
  207                $a_tpl->setCurrentBlock(
"prop_generic");
 
  208                $a_tpl->setVariable(
"PROP_GENERIC", $template->get());
 
  209                $a_tpl->parseCurrentBlock();
 
An exception for terminatinating execution or to throw for unit testing.
This class represents a selection list property in a property form.
getInternalLink()
Get internal linnk.
insert(&$a_tpl)
Insert property html.
getInternalLinkText()
Get internal link text.
setAddCommand($a_add_command)
Set add command.
setValueByArray($a_values)
Set value by array.
setOptions($a_options)
Set Options.
__construct($a_title="", $a_postvar="")
Constructor.
checkInput()
Check input, strip slashes etc.
setInternalLink($a_value)
Set internal link.
getAddCommand()
Get add command.
setValue($a_value)
Set Value.
setInternalLinkText($a_value)
Set internal link.text.
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