ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilAlphabetInputGUI Class Reference

This class represents a text property in a property form. More...

+ Inheritance diagram for ilAlphabetInputGUI:
+ Collaboration diagram for ilAlphabetInputGUI:

Public Member Functions

 __construct ($a_title="", $a_postvar="")
 Constructor.
 setValue ($a_value)
 Set Value.
 getValue ()
 Get Value.
 setValueByArray ($a_values)
 Set value by array.
 setLetters ($a_val)
 Set letters available.
 getLetters ()
 Get letters available.
 checkInput ()
 Check input, strip slashes etc.
 setParentCommand ($a_obj, $a_cmd)
 Insert property html.
 setHighlighted ($a_high_letter)
 Set highlighted.
 getToolbarHTML ()
 Get HTML for toolbar.
- 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.
 getSubForm ()
 Get sub form html.
 hideSubForm ()
 Sub form hidden on init?
 setHiddenTitle ($a_val)
 Set hidden title (for screenreaders)
 getHiddenTitle ()
 Get hidden title.
 getItemByPostVar ($a_post_var)
 Get item by post var.
 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)
 setMulti ($a_multi, $a_sortable=false, $a_addremove=true)
 Set Multi.
 getMulti ()
 Get Multi.
 setMultiValues (array $a_values)
 Set multi values.
 getMultiValues ()
 Get multi values.
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g.

Protected Member Functions

 render ($a_mode="")
 Render item.
- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type.
 getMultiIconsHTML ()
 Get HTML for multiple value icons.

Protected Attributes

 $letters
 $parent_object
 $parent_cmd
 $highlight
 $highlight_letter
- Protected Attributes inherited from ilFormPropertyGUI
 $type
 $title
 $postvar
 $info
 $alert
 $required = false
 $parentgui
 $parentform
 $hidden_title = ""
 $multi = false
 $multi_sortable = false
 $multi_addremove = true
 $multi_values

Detailed Description

This class represents a text property in a property form.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 15 of file class.ilAlphabetInputGUI.php.

Constructor & Destructor Documentation

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

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost Variable

Reimplemented from ilFormPropertyGUI.

Definition at line 29 of file class.ilAlphabetInputGUI.php.

{
parent::__construct($a_title, $a_postvar);
}

Member Function Documentation

ilAlphabetInputGUI::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 90 of file class.ilAlphabetInputGUI.php.

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

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

+ Here is the call graph for this function:

ilAlphabetInputGUI::getLetters ( )

Get letters available.

Returns
array letters

Definition at line 80 of file class.ilAlphabetInputGUI.php.

References $letters.

Referenced by getToolbarHTML().

{
}

+ Here is the caller graph for this function:

ilAlphabetInputGUI::getToolbarHTML ( )

Get HTML for toolbar.

Implements ilToolbarItem.

Definition at line 152 of file class.ilAlphabetInputGUI.php.

References $ilCtrl, $lng, $tpl, and getLetters().

{
global $ilCtrl, $lng;
$lng->loadLanguageModule("form");
$tpl = new ilTemplate("tpl.prop_alphabet.html", true, true, "Services/Form");
foreach ((array)$this->getLetters() as $l)
{
$tpl->setCurrentBlock("letter");
$tpl->setVariable("TXT_LET", $l);
$ilCtrl->setParameter($this->parent_object, "letter", rawurlencode($l));
$tpl->setVariable("TXT_LET", $l);
$tpl->setVariable("HREF_LET", $ilCtrl->getLinkTarget($this->parent_object, $this->parent_cmd));
if ($this->highlight && $this->highlight_letter !== null && $this->highlight_letter == $l)
{
$tpl->setVariable("CLASS", ' class="ilHighlighted" ');
}
$tpl->parseCurrentBlock();
}
$ilCtrl->setParameter($this->parent_object, "letter", "");
$tpl->setVariable("TXT_ALL", $lng->txt("form_alphabet_all"));
$tpl->setVariable("HREF_ALL", $ilCtrl->getLinkTarget($this->parent_object, $this->parent_cmd));
if ($this->highlight && $this->highlight_letter === null)
{
$tpl->setVariable("CLASSA", ' class="ilHighlighted" ');
}
return $tpl->get();
}

+ Here is the call graph for this function:

ilAlphabetInputGUI::getValue ( )

Get Value.

Returns
string Value

Definition at line 49 of file class.ilAlphabetInputGUI.php.

{
return $this->value;
}
ilAlphabetInputGUI::render (   $a_mode = "")
protected

Render item.

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

{
die("only implemented for toolbar usage");
}
ilAlphabetInputGUI::setHighlighted (   $a_high_letter)

Set highlighted.

Parameters
@return

Definition at line 143 of file class.ilAlphabetInputGUI.php.

{
$this->highlight = true;
$this->highlight_letter = $a_high_letter;
}
ilAlphabetInputGUI::setLetters (   $a_val)

Set letters available.

Parameters
arrayletters

Definition at line 70 of file class.ilAlphabetInputGUI.php.

Referenced by ilGlossaryPresentationGUI\listTerms().

{
$this->letters = $a_val;
}

+ Here is the caller graph for this function:

ilAlphabetInputGUI::setParentCommand (   $a_obj,
  $a_cmd 
)

Insert property html.

Returns
int Size Set parent cmd
Parameters
objectparent object
stringparent command

Definition at line 131 of file class.ilAlphabetInputGUI.php.

{
$this->parent_object = $a_obj;
$this->parent_cmd = $a_cmd;
}
ilAlphabetInputGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

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

Referenced by setValueByArray().

{
$this->value = $a_value;
}

+ Here is the caller graph for this function:

ilAlphabetInputGUI::setValueByArray (   $a_values)

Set value by array.

Parameters
array$a_valuesvalue array

Definition at line 60 of file class.ilAlphabetInputGUI.php.

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

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

+ Here is the call graph for this function:

Field Documentation

ilAlphabetInputGUI::$highlight
protected

Definition at line 20 of file class.ilAlphabetInputGUI.php.

ilAlphabetInputGUI::$highlight_letter
protected

Definition at line 21 of file class.ilAlphabetInputGUI.php.

ilAlphabetInputGUI::$letters
protected

Definition at line 17 of file class.ilAlphabetInputGUI.php.

Referenced by getLetters().

ilAlphabetInputGUI::$parent_cmd
protected

Definition at line 19 of file class.ilAlphabetInputGUI.php.

ilAlphabetInputGUI::$parent_object
protected

Definition at line 18 of file class.ilAlphabetInputGUI.php.


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