ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilSuggestedSolutionSelectorGUI Class Reference

This class represents a selection list property in a property form. More...

+ Inheritance diagram for ilSuggestedSolutionSelectorGUI:
+ Collaboration diagram for ilSuggestedSolutionSelectorGUI:

Public Member Functions

 __construct ($a_title="", $a_postvar="")
 Constructor.
 setOptions ($a_options)
 Set Options.
 getOptions ()
 Get Options.
 setValue ($a_value)
 Set Value.
 getValue ()
 Get Value.
 setInternalLink ($a_value)
 Set internal link.
 getInternalLink ()
 Get internal linnk.
 setInternalLinkText ($a_value)
 Set internal link.text.
 getInternalLinkText ()
 Get internal link text.
 setAddCommand ($a_add_command)
 Set add command.
 getAddCommand ()
 Get add command.
 setValueByArray ($a_values)
 Set value by array.
 checkInput ()
 Check input, strip slashes etc.
 insert (&$a_tpl)
 Insert property html.
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem ($a_item)
 Add Subitem.
 getSubItems ()
 Get Subitems.
 checkSubItemsInput ()
 Check SubItems.
 getSubForm ()
 Get sub form html.
 getItemByPostVar ($a_post_var)
 Get item by post var.
- Public Member Functions inherited from ilFormPropertyGUI
executeCommand ()
 Execute command.
 getType ()
 Get Type.
 setTitle ($a_title)
 Set Title.
 getTitle ()
 Get Title.
 setPostVar ($a_postvar)
 Set Post Variable.
 getPostVar ()
 Get Post Variable.
 getFieldId ()
 Get Post Variable.
 setInfo ($a_info)
 Set Information Text.
 getInfo ()
 Get Information Text.
 setAlert ($a_alert)
 Set Alert Text.
 getAlert ()
 Get Alert Text.
 setRequired ($a_required)
 Set Required.
 getRequired ()
 Get Required.
 setDisabled ($a_disabled)
 Set Disabled.
 getDisabled ()
 Get Disabled.
 setParentForm ($a_parentform)
 Set Parent Form.
 getParentForm ()
 Get Parent Form.
 setParent ($a_val)
 Set Parent GUI object.
 getParent ()
 Get Parent GUI object.
 hideSubForm ()
 Sub form hidden on init?
 setHiddenTitle ($a_val)
 Set hidden title (for screenreaders)
 getHiddenTitle ()
 Get hidden title.
 serializeData ()
 serialize data
 unserializeData ($a_data)
 unserialize data
 writeToSession ()
 Write to session.
 clearFromSession ()
 Clear session value.
 readFromSession ()
 Read from session.
 getHiddenTag ($a_post_var, $a_value)
 Get hidden tag (used for disabled properties)

Protected Attributes

 $options
 $value
 $addCommand
 $intlink
 $intlinktext
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
 $sub_items = array()
- Protected Attributes inherited from ilFormPropertyGUI
 $type
 $title
 $postvar
 $info
 $alert
 $required = false
 $parentgui
 $parentform

Additional Inherited Members

- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type.

Detailed Description

This class represents a selection list property in a property form.

Author
Helmut Schottmüller ilias.nosp@m.@aur.nosp@m.ealis.nosp@m..de
Version
Id:
class.ilSuggestedSolutionSelectorGUI.php 18186 2008-12-08 10:50:44Z hschottm

Definition at line 33 of file class.ilSuggestedSolutionSelectorGUI.php.

Constructor & Destructor Documentation

ilSuggestedSolutionSelectorGUI::__construct (   $a_title = "",
  $a_postvar = "" 
)

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost Variable

Reimplemented from ilFormPropertyGUI.

Definition at line 47 of file class.ilSuggestedSolutionSelectorGUI.php.

References ilFormPropertyGUI\setType().

{
parent::__construct($a_title, $a_postvar);
$this->setType("select");
}

+ Here is the call graph for this function:

Member Function Documentation

ilSuggestedSolutionSelectorGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Returns
boolean Input ok, true/false

Reimplemented from ilFormPropertyGUI.

Definition at line 168 of file class.ilSuggestedSolutionSelectorGUI.php.

References $_POST, $lng, ilSubEnabledFormPropertyGUI\checkSubItemsInput(), ilFormPropertyGUI\getPostVar(), ilFormPropertyGUI\getRequired(), ilFormPropertyGUI\setAlert(), and ilUtil\stripSlashes().

{
global $lng;
$_POST[$this->getPostVar()] =
if ($this->getRequired() && trim($_POST[$this->getPostVar()]) == "")
{
$this->setAlert($lng->txt("msg_input_is_required"));
return false;
}
return $this->checkSubItemsInput();
}

+ Here is the call graph for this function:

ilSuggestedSolutionSelectorGUI::getAddCommand ( )

Get add command.

Returns
string add command

Definition at line 148 of file class.ilSuggestedSolutionSelectorGUI.php.

Referenced by insert().

{
return ($this->addCommand) ? $this->addCommand : "addInternalLink";
}

+ Here is the caller graph for this function:

ilSuggestedSolutionSelectorGUI::getInternalLink ( )

Get internal linnk.

Returns
string Internal link

Definition at line 108 of file class.ilSuggestedSolutionSelectorGUI.php.

References $intlink.

Referenced by insert().

{
}

+ Here is the caller graph for this function:

ilSuggestedSolutionSelectorGUI::getInternalLinkText ( )

Get internal link text.

Returns
string Internal link text

Definition at line 128 of file class.ilSuggestedSolutionSelectorGUI.php.

References $intlinktext.

Referenced by insert().

{
}

+ Here is the caller graph for this function:

ilSuggestedSolutionSelectorGUI::getOptions ( )

Get Options.

Returns
array Options. Array ("value" => "option_text")

Definition at line 68 of file class.ilSuggestedSolutionSelectorGUI.php.

References $options.

Referenced by insert().

{
}

+ Here is the caller graph for this function:

ilSuggestedSolutionSelectorGUI::getValue ( )

Get Value.

Returns
string Value

Definition at line 88 of file class.ilSuggestedSolutionSelectorGUI.php.

References $value.

Referenced by insert().

{
return $this->value;
}

+ Here is the caller graph for this function:

ilSuggestedSolutionSelectorGUI::insert ( $a_tpl)

Insert property html.

Returns
int Size

Definition at line 188 of file class.ilSuggestedSolutionSelectorGUI.php.

References $lng, getAddCommand(), ilFormPropertyGUI\getDisabled(), getInternalLink(), getInternalLinkText(), getOptions(), ilFormPropertyGUI\getPostVar(), and getValue().

{
global $lng;
$template = new ilTemplate("tpl.prop_suggestedsolutionselector.html", TRUE, TRUE, "Modules/TestQuestionPool");
foreach($this->getOptions() as $option_value => $option_text)
{
$template->setCurrentBlock("prop_intlink_select_option");
$template->setVariable("VAL_SELECT_OPTION", $option_value);
if ($option_value == $this->getValue())
{
$template->setVariable("CHK_SEL_OPTION",
'selected="selected"');
}
$template->setVariable("TXT_SELECT_OPTION", $option_text);
$template->parseCurrentBlock();
}
if ($this->getInternalLink())
{
$template->setCurrentBlock("delete_internallink");
$template->setVariable("TEXT_DELETE_INTERNALLINK", $lng->txt("remove_solution"));
$template->setVariable("POST_VAR", $this->getPostVar());
$template->parseCurrentBlock();
$template->setCurrentBlock("internal_link");
$template->setVariable("HREF_INT_LINK", $this->getInternalLink());
$template->setVariable("TEXT_INT_LINK", $this->getInternalLinkText());
$template->parseCurrentBlock();
}
$template->setCurrentBlock("prop_internallink_selector");
$template->setVariable("POST_VAR", $this->getPostVar());
if ($this->getDisabled())
{
$template->setVariable("DISABLED",
" disabled=\"disabled\"");
}
$template->setVariable("TEXT_ADD_INTERNALLINK", ($this->getInternalLink()) ? $lng->txt("change") : $lng->txt("add"));
$template->setVariable("CMD_ADD_INTERNALLINK", $this->getAddCommand());
$template->parseCurrentBlock();
$a_tpl->setCurrentBlock("prop_generic");
$a_tpl->setVariable("PROP_GENERIC", $template->get());
$a_tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

ilSuggestedSolutionSelectorGUI::setAddCommand (   $a_add_command)

Set add command.

Parameters
string$a_add_commandadd command

Definition at line 138 of file class.ilSuggestedSolutionSelectorGUI.php.

{
$this->addCommand = $a_add_command;
}
ilSuggestedSolutionSelectorGUI::setInternalLink (   $a_value)

Set internal link.

Parameters
string$a_valueValue

Definition at line 98 of file class.ilSuggestedSolutionSelectorGUI.php.

{
$this->intlink = $a_value;
}
ilSuggestedSolutionSelectorGUI::setInternalLinkText (   $a_value)

Set internal link.text.

Parameters
string$a_valueInternal link text

Definition at line 118 of file class.ilSuggestedSolutionSelectorGUI.php.

{
$this->intlinktext = $a_value;
}
ilSuggestedSolutionSelectorGUI::setOptions (   $a_options)

Set Options.

Parameters
array$a_optionsOptions. Array ("value" => "option_text")

Definition at line 58 of file class.ilSuggestedSolutionSelectorGUI.php.

{
$this->options = $a_options;
}
ilSuggestedSolutionSelectorGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

Definition at line 78 of file class.ilSuggestedSolutionSelectorGUI.php.

Referenced by setValueByArray().

{
$this->value = $a_value;
}

+ Here is the caller graph for this function:

ilSuggestedSolutionSelectorGUI::setValueByArray (   $a_values)

Set value by array.

Parameters
array$a_valuesvalue array

Definition at line 158 of file class.ilSuggestedSolutionSelectorGUI.php.

References ilFormPropertyGUI\getPostVar(), and setValue().

{
$this->setValue($a_values[$this->getPostVar()]);
}

+ Here is the call graph for this function:

Field Documentation

ilSuggestedSolutionSelectorGUI::$addCommand
protected

Definition at line 37 of file class.ilSuggestedSolutionSelectorGUI.php.

ilSuggestedSolutionSelectorGUI::$intlink
protected

Definition at line 38 of file class.ilSuggestedSolutionSelectorGUI.php.

Referenced by getInternalLink().

ilSuggestedSolutionSelectorGUI::$intlinktext
protected

Definition at line 39 of file class.ilSuggestedSolutionSelectorGUI.php.

Referenced by getInternalLinkText().

ilSuggestedSolutionSelectorGUI::$options
protected

Definition at line 35 of file class.ilSuggestedSolutionSelectorGUI.php.

Referenced by getOptions().

ilSuggestedSolutionSelectorGUI::$value
protected

Definition at line 36 of file class.ilSuggestedSolutionSelectorGUI.php.

Referenced by getValue().


The documentation for this class was generated from the following file: