ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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. More...
 
 setAllValue ($a_allvalue)
 Set All Value. More...
 
 getAllValue ()
 Get All Value. More...
 
 setTopValue ($a_topvalue)
 Set Top Value. More...
 
 getTopValue ()
 Get Top Value. More...
 
 setBottomValue ($a_bottomvalue)
 Set Bottom Value. More...
 
 getBottomValue ()
 Get Bottom Value. More...
 
 setLeftValue ($a_leftvalue)
 Set Left Value. More...
 
 getLeftValue ()
 Get Left Value. More...
 
 setRightValue ($a_rightvalue)
 Set Right Value. More...
 
 getRightValue ()
 Get Right Value. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 insert (&$a_tpl)
 Insert property html. More...
 
 setValueByArray ($a_values)
 Set value by array. More...
 
- Public Member Functions inherited from ilFormPropertyGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
executeCommand ()
 Execute command. More...
 
 getType ()
 Get Type. More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setPostVar ($a_postvar)
 Set Post Variable. More...
 
 getPostVar ()
 Get Post Variable. More...
 
 getFieldId ()
 Get Post Variable. More...
 
 setInfo ($a_info)
 Set Information Text. More...
 
 getInfo ()
 Get Information Text. More...
 
 setAlert ($a_alert)
 Set Alert Text. More...
 
 getAlert ()
 Get Alert Text. More...
 
 setRequired ($a_required)
 Set Required. More...
 
 getRequired ()
 Get Required. More...
 
 setDisabled ($a_disabled)
 Set Disabled. More...
 
 getDisabled ()
 Get Disabled. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 setParentForm ($a_parentform)
 Set Parent Form. More...
 
 getParentForm ()
 Get Parent Form. More...
 
 setParent ($a_val)
 Set Parent GUI object. More...
 
 getParent ()
 Get Parent GUI object. More...
 
 getSubForm ()
 Get sub form html. More...
 
 hideSubForm ()
 Sub form hidden on init? More...
 
 setHiddenTitle ($a_val)
 Set hidden title (for screenreaders) More...
 
 getHiddenTitle ()
 Get hidden title. More...
 
 getItemByPostVar ($a_post_var)
 Get item by post var. More...
 
 serializeData ()
 serialize data More...
 
 unserializeData ($a_data)
 unserialize data More...
 
 writeToSession ()
 Write to session. More...
 
 clearFromSession ()
 Clear session value. More...
 
 readFromSession ()
 Read from session. More...
 
 getHiddenTag ($a_post_var, $a_value)
 Get hidden tag (used for disabled properties) More...
 
 setMulti ($a_multi, $a_sortable=false, $a_addremove=true)
 Set Multi. More...
 
 getMulti ()
 Get Multi. More...
 
 setMultiValues (array $a_values)
 Set multi values. More...
 
 getMultiValues ()
 Get multi values. More...
 
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g. More...
 
 removeProhibitedCharacters ($a_text)
 Remove prohibited characters see #19159. More...
 
 stripSlashesAddSpaceFallback ($a_str)
 Strip slashes with add space fallback, see https://www.ilias.de/mantis/view.php?id=19727. More...
 

Protected Attributes

 $value
 
- 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
 

Additional Inherited Members

- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type. More...
 
 getMultiIconsHTML ()
 Get HTML for multiple value icons. More...
 

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

◆ __construct()

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.

23 {
24 parent::__construct($a_title, $a_postvar);
25 $this->setType("border_style");
26 $this->dirs = array("all", "top", "bottom", "left", "right");
27 }
setType($a_type)
Set Type.

References ilFormPropertyGUI\setType().

+ Here is the call graph for this function:

Member Function Documentation

◆ checkInput()

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.

135 {
136 global $lng;
137
138 foreach ($this->dirs as $dir)
139 {
140 $pre_value = $_POST[$this->getPostVar()][$dir]["pre_value"] =
141 ilUtil::stripSlashes($_POST[$this->getPostVar()][$dir]["pre_value"]);
142
143 /*
144 if ($this->getRequired() && trim($num_value) == "")
145 {
146 $this->setAlert($lng->txt("msg_input_is_required"));
147
148 return false;
149 }*/
150
151 $value = $pre_value;
152
153 if (trim($value) != "")
154 {
155 switch ($dir)
156 {
157 case "all": $this->setAllValue($value); break;
158 case "top": $this->setTopValue($value); break;
159 case "bottom": $this->setBottomValue($value); break;
160 case "left": $this->setLeftValue($value); break;
161 case "right": $this->setRightValue($value); break;
162 }
163 }
164
165 }
166
167 return true;
168 }
getPostVar()
Get Post Variable.
setTopValue($a_topvalue)
Set Top Value.
setBottomValue($a_bottomvalue)
Set Bottom Value.
setLeftValue($a_leftvalue)
Set Left Value.
setAllValue($a_allvalue)
Set All Value.
setRightValue($a_rightvalue)
Set Right Value.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$_POST['username']
Definition: cron.php:12
global $lng
Definition: privfeed.php:40

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

+ Here is the call graph for this function:

◆ getAllValue()

ilTRBLBorderStyleInputGUI::getAllValue ( )

Get All Value.

Returns
string All Value

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

45 {
46 return $this->allvalue;
47 }

Referenced by insert().

+ Here is the caller graph for this function:

◆ getBottomValue()

ilTRBLBorderStyleInputGUI::getBottomValue ( )

Get Bottom Value.

Returns
string Bottom Value

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

85 {
86 return $this->bottomvalue;
87 }

Referenced by insert().

+ Here is the caller graph for this function:

◆ getLeftValue()

ilTRBLBorderStyleInputGUI::getLeftValue ( )

Get Left Value.

Returns
string Left Value

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

105 {
106 return $this->leftvalue;
107 }

Referenced by insert().

+ Here is the caller graph for this function:

◆ getRightValue()

ilTRBLBorderStyleInputGUI::getRightValue ( )

Get Right Value.

Returns
string Right Value

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

125 {
126 return $this->rightvalue;
127 }

Referenced by insert().

+ Here is the caller graph for this function:

◆ getTopValue()

ilTRBLBorderStyleInputGUI::getTopValue ( )

Get Top Value.

Returns
string Top Value

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

65 {
66 return $this->topvalue;
67 }

Referenced by insert().

+ Here is the caller graph for this function:

◆ insert()

ilTRBLBorderStyleInputGUI::insert ( $a_tpl)

Insert property html.

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

174 {
175 global $lng;
176
177 $layout_tpl = new ilTemplate("tpl.prop_trbl_layout.html", true, true, "Services/Style");
178
179 foreach ($this->dirs as $dir)
180 {
181 $tpl = new ilTemplate("tpl.prop_trbl_select.html", true, true, "Services/Style");
182 $pre_options = array_merge(array("" => ""),
184
185 switch($dir)
186 {
187 case "all": $value = strtolower(trim($this->getAllValue())); break;
188 case "top": $value = strtolower(trim($this->getTopValue())); break;
189 case "bottom": $value = strtolower(trim($this->getBottomValue())); break;
190 case "left": $value = strtolower(trim($this->getLeftValue())); break;
191 case "right": $value = strtolower(trim($this->getRightValue())); break;
192 }
193
194 foreach ($pre_options as $option)
195 {
196 $tpl->setCurrentBlock("pre_option");
197 $tpl->setVariable("VAL_PRE", $option);
198 $tpl->setVariable("TXT_PRE", $option);
199 if ($value == $option)
200 {
201 $tpl->setVariable("PRE_SELECTED", 'selected="selected"');
202 }
203 $tpl->parseCurrentBlock();
204 }
205
206 $tpl->setVariable("POSTVAR", $this->getPostVar());
207 $tpl->setVariable("TXT_DIR", $lng->txt("sty_$dir"));
208 $tpl->setVariable("DIR", $dir);
209
210 $layout_tpl->setVariable(strtoupper($dir), $tpl->get());
211 }
212
213 $a_tpl->setCurrentBlock("prop_generic");
214 $a_tpl->setVariable("PROP_GENERIC", $layout_tpl->get());
215 $a_tpl->parseCurrentBlock();
216 }
global $tpl
Definition: ilias.php:8
static _getStyleParameterValues($par)
special template class to simplify handling of ITX/PEAR

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

+ Here is the call graph for this function:

◆ setAllValue()

ilTRBLBorderStyleInputGUI::setAllValue (   $a_allvalue)

Set All Value.

Parameters
string$a_allvalueAll Value

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

35 {
36 $this->allvalue = $a_allvalue;
37 }

Referenced by checkInput(), and setValueByArray().

+ Here is the caller graph for this function:

◆ setBottomValue()

ilTRBLBorderStyleInputGUI::setBottomValue (   $a_bottomvalue)

Set Bottom Value.

Parameters
string$a_bottomvalueBottom Value

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

75 {
76 $this->bottomvalue = $a_bottomvalue;
77 }

Referenced by checkInput(), and setValueByArray().

+ Here is the caller graph for this function:

◆ setLeftValue()

ilTRBLBorderStyleInputGUI::setLeftValue (   $a_leftvalue)

Set Left Value.

Parameters
string$a_leftvalueLeft Value

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

95 {
96 $this->leftvalue = $a_leftvalue;
97 }

Referenced by checkInput(), and setValueByArray().

+ Here is the caller graph for this function:

◆ setRightValue()

ilTRBLBorderStyleInputGUI::setRightValue (   $a_rightvalue)

Set Right Value.

Parameters
string$a_rightvalueRight Value

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

115 {
116 $this->rightvalue = $a_rightvalue;
117 }

Referenced by checkInput(), and setValueByArray().

+ Here is the caller graph for this function:

◆ setTopValue()

ilTRBLBorderStyleInputGUI::setTopValue (   $a_topvalue)

Set Top Value.

Parameters
string$a_topvalueTop Value

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

55 {
56 $this->topvalue = $a_topvalue;
57 }

Referenced by checkInput(), and setValueByArray().

+ Here is the caller graph for this function:

◆ setValueByArray()

ilTRBLBorderStyleInputGUI::setValueByArray (   $a_values)

Set value by array.

Parameters
array$a_valuesvalue array

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

224 {
225 global $ilUser;
226
227 $this->setAllValue($a_values[$this->getPostVar()]["all"]["pre_value"]);
228 $this->setBottomValue($a_values[$this->getPostVar()]["bottom"]["pre_value"]);
229 $this->setTopValue($a_values[$this->getPostVar()]["top"]["pre_value"]);
230 $this->setLeftValue($a_values[$this->getPostVar()]["left"]["pre_value"]);
231 $this->setRightValue($a_values[$this->getPostVar()]["right"]["pre_value"]);
232 }
global $ilUser
Definition: imgupload.php:15

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

+ Here is the call graph for this function:

Field Documentation

◆ $value

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: