ILIAS  release_7 Revision v7.30-3-g800a261c036
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...
 
 stripSlashesAddSpaceFallback ($a_str)
 Strip slashes with add space fallback, see https://www.ilias.de/mantis/view.php?id=19727. More...
 
 getTableFilterLabelFor ()
 Get label "for" attribute value for filter. More...
 
 getFormLabelFor ()
 Get label "for" attribute value for form. More...
 

Protected Attributes

 $user
 
 $value
 
- Protected Attributes inherited from ilFormPropertyGUI
 $ctrl
 
 $lng
 
 $type
 
 $title
 
 $postvar
 
 $info
 
 $alert
 
 $required = false
 
 $parentgui
 
 $parentform
 
 $hidden_title = ""
 
 $multi = false
 
 $multi_sortable = false
 
 $multi_addremove = true
 
 $multi_values
 

Additional Inherited Members

- Static Public Member Functions inherited from ilFormPropertyGUI
static removeProhibitedCharacters ($a_text)
 Remove prohibited characters see #19159. More...
 
- 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 27 of file class.ilTRBLBorderStyleInputGUI.php.

28 {
29 global $DIC;
30
31 $this->lng = $DIC->language();
32 $this->user = $DIC->user();
33 parent::__construct($a_title, $a_postvar);
34 $this->setType("border_style");
35 $this->dirs = array("all", "top", "bottom", "left", "right");
36 }
user()
Definition: user.php:4
setType($a_type)
Set Type.
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ilFormPropertyGUI\setType(), and user().

+ 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 143 of file class.ilTRBLBorderStyleInputGUI.php.

144 {
146
147 foreach ($this->dirs as $dir) {
148 $pre_value = $_POST[$this->getPostVar()][$dir]["pre_value"] =
149 ilUtil::stripSlashes($_POST[$this->getPostVar()][$dir]["pre_value"]);
150
151 /*
152 if ($this->getRequired() && trim($num_value) == "")
153 {
154 $this->setAlert($lng->txt("msg_input_is_required"));
155
156 return false;
157 }*/
158
159 $value = $pre_value;
160
161 if (trim($value) != "") {
162 switch ($dir) {
163 case "all": $this->setAllValue($value); break;
164 case "top": $this->setTopValue($value); break;
165 case "bottom": $this->setBottomValue($value); break;
166 case "left": $this->setLeftValue($value); break;
167 case "right": $this->setRightValue($value); break;
168 }
169 }
170 }
171
172 return true;
173 }
$_POST["username"]
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

References $_POST, ilFormPropertyGUI\$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 53 of file class.ilTRBLBorderStyleInputGUI.php.

54 {
55 return $this->allvalue;
56 }

Referenced by insert().

+ Here is the caller graph for this function:

◆ getBottomValue()

ilTRBLBorderStyleInputGUI::getBottomValue ( )

Get Bottom Value.

Returns
string Bottom Value

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

94 {
95 return $this->bottomvalue;
96 }

Referenced by insert().

+ Here is the caller graph for this function:

◆ getLeftValue()

ilTRBLBorderStyleInputGUI::getLeftValue ( )

Get Left Value.

Returns
string Left Value

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

114 {
115 return $this->leftvalue;
116 }

Referenced by insert().

+ Here is the caller graph for this function:

◆ getRightValue()

ilTRBLBorderStyleInputGUI::getRightValue ( )

Get Right Value.

Returns
string Right Value

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

134 {
135 return $this->rightvalue;
136 }

Referenced by insert().

+ Here is the caller graph for this function:

◆ getTopValue()

ilTRBLBorderStyleInputGUI::getTopValue ( )

Get Top Value.

Returns
string Top Value

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

74 {
75 return $this->topvalue;
76 }

Referenced by insert().

+ Here is the caller graph for this function:

◆ insert()

ilTRBLBorderStyleInputGUI::insert ( $a_tpl)

Insert property html.

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

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

References ilFormPropertyGUI\$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 43 of file class.ilTRBLBorderStyleInputGUI.php.

44 {
45 $this->allvalue = $a_allvalue;
46 }

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

84 {
85 $this->bottomvalue = $a_bottomvalue;
86 }

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

104 {
105 $this->leftvalue = $a_leftvalue;
106 }

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

124 {
125 $this->rightvalue = $a_rightvalue;
126 }

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

64 {
65 $this->topvalue = $a_topvalue;
66 }

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

227 {
229
230 $this->setAllValue($a_values[$this->getPostVar()]["all"]["pre_value"]);
231 $this->setBottomValue($a_values[$this->getPostVar()]["bottom"]["pre_value"]);
232 $this->setTopValue($a_values[$this->getPostVar()]["top"]["pre_value"]);
233 $this->setLeftValue($a_values[$this->getPostVar()]["left"]["pre_value"]);
234 $this->setRightValue($a_values[$this->getPostVar()]["right"]["pre_value"]);
235 }
$ilUser
Definition: imgupload.php:18

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

+ Here is the call graph for this function:

Field Documentation

◆ $user

ilTRBLBorderStyleInputGUI::$user
protected

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

Referenced by setValueByArray().

◆ $value

ilTRBLBorderStyleInputGUI::$value
protected

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

Referenced by checkInput(), and insert().


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