ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTRBLBorderStyleInputGUI Class Reference

This class represents a border style with all/top/right/bottom/left in a property form. More...

+ Inheritance diagram for ilTRBLBorderStyleInputGUI:
+ Collaboration diagram for ilTRBLBorderStyleInputGUI:

Public Member Functions

 __construct ($a_title="", $a_postvar="")
 Constructor.
 setAllValue ($a_allvalue)
 Set All Value.
 getAllValue ()
 Get All Value.
 setTopValue ($a_topvalue)
 Set Top Value.
 getTopValue ()
 Get Top Value.
 setBottomValue ($a_bottomvalue)
 Set Bottom Value.
 getBottomValue ()
 Get Bottom Value.
 setLeftValue ($a_leftvalue)
 Set Left Value.
 getLeftValue ()
 Get Left Value.
 setRightValue ($a_rightvalue)
 Set Right Value.
 getRightValue ()
 Get Right Value.
 checkInput ()
 Check input, strip slashes etc.
 insert (&$a_tpl)
 Insert property html.
 setValueByArray ($a_values)
 Set value by array.
- 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)

Protected Attributes

 $value
- Protected Attributes inherited from ilFormPropertyGUI
 $type
 $title
 $postvar
 $info
 $alert
 $required = false
 $parentgui
 $parentform
 $hidden_title = ""

Additional Inherited Members

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

Detailed Description

This class represents a border style with all/top/right/bottom/left 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 12 of file class.ilTRBLBorderStyleInputGUI.php.

Constructor & Destructor Documentation

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

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost Variable

Reimplemented from ilFormPropertyGUI.

Definition at line 22 of file class.ilTRBLBorderStyleInputGUI.php.

References ilFormPropertyGUI\setType().

{
parent::__construct($a_title, $a_postvar);
$this->setType("border_style");
$this->dirs = array("all", "top", "bottom", "left", "right");
}

+ Here is the call graph for this function:

Member Function Documentation

ilTRBLBorderStyleInputGUI::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 134 of file class.ilTRBLBorderStyleInputGUI.php.

References $_POST, $dir, $lng, $value, ilFormPropertyGUI\getPostVar(), setAllValue(), setBottomValue(), setLeftValue(), setRightValue(), setTopValue(), and ilUtil\stripSlashes().

{
global $lng;
foreach ($this->dirs as $dir)
{
$pre_value = $_POST[$this->getPostVar()][$dir]["pre_value"] =
ilUtil::stripSlashes($_POST[$this->getPostVar()][$dir]["pre_value"]);
/*
if ($this->getRequired() && trim($num_value) == "")
{
$this->setAlert($lng->txt("msg_input_is_required"));
return false;
}*/
$value = $pre_value;
if (trim($value) != "")
{
switch ($dir)
{
case "all": $this->setAllValue($value); break;
case "top": $this->setTopValue($value); break;
case "bottom": $this->setBottomValue($value); break;
case "left": $this->setLeftValue($value); break;
case "right": $this->setRightValue($value); break;
}
}
}
return true;
}

+ Here is the call graph for this function:

ilTRBLBorderStyleInputGUI::getAllValue ( )

Get All Value.

Returns
string All Value

Definition at line 44 of file class.ilTRBLBorderStyleInputGUI.php.

Referenced by insert().

{
return $this->allvalue;
}

+ Here is the caller graph for this function:

ilTRBLBorderStyleInputGUI::getBottomValue ( )

Get Bottom Value.

Returns
string Bottom Value

Definition at line 84 of file class.ilTRBLBorderStyleInputGUI.php.

Referenced by insert().

{
return $this->bottomvalue;
}

+ Here is the caller graph for this function:

ilTRBLBorderStyleInputGUI::getLeftValue ( )

Get Left Value.

Returns
string Left Value

Definition at line 104 of file class.ilTRBLBorderStyleInputGUI.php.

Referenced by insert().

{
return $this->leftvalue;
}

+ Here is the caller graph for this function:

ilTRBLBorderStyleInputGUI::getRightValue ( )

Get Right Value.

Returns
string Right Value

Definition at line 124 of file class.ilTRBLBorderStyleInputGUI.php.

Referenced by insert().

{
return $this->rightvalue;
}

+ Here is the caller graph for this function:

ilTRBLBorderStyleInputGUI::getTopValue ( )

Get Top Value.

Returns
string Top Value

Definition at line 64 of file class.ilTRBLBorderStyleInputGUI.php.

Referenced by insert().

{
return $this->topvalue;
}

+ Here is the caller graph for this function:

ilTRBLBorderStyleInputGUI::insert ( $a_tpl)

Insert property html.

Definition at line 173 of file class.ilTRBLBorderStyleInputGUI.php.

References $dir, $lng, $tpl, $value, ilObjStyleSheet\_getStyleParameterValues(), getAllValue(), getBottomValue(), getLeftValue(), ilFormPropertyGUI\getPostVar(), getRightValue(), and getTopValue().

{
global $lng;
$layout_tpl = new ilTemplate("tpl.prop_trbl_layout.html", true, true, "Services/Style");
foreach ($this->dirs as $dir)
{
$tpl = new ilTemplate("tpl.prop_trbl_select.html", true, true, "Services/Style");
$pre_options = array_merge(array("" => ""),
switch($dir)
{
case "all": $value = strtolower(trim($this->getAllValue())); break;
case "top": $value = strtolower(trim($this->getTopValue())); break;
case "bottom": $value = strtolower(trim($this->getBottomValue())); break;
case "left": $value = strtolower(trim($this->getLeftValue())); break;
case "right": $value = strtolower(trim($this->getRightValue())); break;
}
foreach ($pre_options as $option)
{
$tpl->setCurrentBlock("pre_option");
$tpl->setVariable("VAL_PRE", $option);
$tpl->setVariable("TXT_PRE", $option);
if ($value == $option)
{
$tpl->setVariable("PRE_SELECTED", 'selected="selected"');
}
$tpl->parseCurrentBlock();
}
$tpl->setVariable("POSTVAR", $this->getPostVar());
$tpl->setVariable("TXT_DIR", $lng->txt("sty_$dir"));
$tpl->setVariable("DIR", $dir);
$layout_tpl->setVariable(strtoupper($dir), $tpl->get());
}
$a_tpl->setCurrentBlock("prop_generic");
$a_tpl->setVariable("PROP_GENERIC", $layout_tpl->get());
$a_tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

ilTRBLBorderStyleInputGUI::setAllValue (   $a_allvalue)

Set All Value.

Parameters
string$a_allvalueAll Value

Definition at line 34 of file class.ilTRBLBorderStyleInputGUI.php.

Referenced by checkInput(), and setValueByArray().

{
$this->allvalue = $a_allvalue;
}

+ Here is the caller graph for this function:

ilTRBLBorderStyleInputGUI::setBottomValue (   $a_bottomvalue)

Set Bottom Value.

Parameters
string$a_bottomvalueBottom Value

Definition at line 74 of file class.ilTRBLBorderStyleInputGUI.php.

Referenced by checkInput(), and setValueByArray().

{
$this->bottomvalue = $a_bottomvalue;
}

+ Here is the caller graph for this function:

ilTRBLBorderStyleInputGUI::setLeftValue (   $a_leftvalue)

Set Left Value.

Parameters
string$a_leftvalueLeft Value

Definition at line 94 of file class.ilTRBLBorderStyleInputGUI.php.

Referenced by checkInput(), and setValueByArray().

{
$this->leftvalue = $a_leftvalue;
}

+ Here is the caller graph for this function:

ilTRBLBorderStyleInputGUI::setRightValue (   $a_rightvalue)

Set Right Value.

Parameters
string$a_rightvalueRight Value

Definition at line 114 of file class.ilTRBLBorderStyleInputGUI.php.

Referenced by checkInput(), and setValueByArray().

{
$this->rightvalue = $a_rightvalue;
}

+ Here is the caller graph for this function:

ilTRBLBorderStyleInputGUI::setTopValue (   $a_topvalue)

Set Top Value.

Parameters
string$a_topvalueTop Value

Definition at line 54 of file class.ilTRBLBorderStyleInputGUI.php.

Referenced by checkInput(), and setValueByArray().

{
$this->topvalue = $a_topvalue;
}

+ Here is the caller graph for this function:

ilTRBLBorderStyleInputGUI::setValueByArray (   $a_values)

Set value by array.

Parameters
array$a_valuesvalue array

Definition at line 223 of file class.ilTRBLBorderStyleInputGUI.php.

References ilFormPropertyGUI\getPostVar(), setAllValue(), setBottomValue(), setLeftValue(), setRightValue(), and setTopValue().

{
global $ilUser;
$this->setAllValue($a_values[$this->getPostVar()]["all"]["pre_value"]);
$this->setBottomValue($a_values[$this->getPostVar()]["bottom"]["pre_value"]);
$this->setTopValue($a_values[$this->getPostVar()]["top"]["pre_value"]);
$this->setLeftValue($a_values[$this->getPostVar()]["left"]["pre_value"]);
$this->setRightValue($a_values[$this->getPostVar()]["right"]["pre_value"]);
}

+ Here is the call graph for this function:

Field Documentation

ilTRBLBorderStyleInputGUI::$value
protected

Definition at line 14 of file class.ilTRBLBorderStyleInputGUI.php.

Referenced by checkInput(), and insert().


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