ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules 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 (string $a_title="", string $a_postvar="")
 
 setAllValue (string $a_allvalue)
 
 getAllValue ()
 
 setTopValue (string $a_topvalue)
 
 getTopValue ()
 
 setBottomValue (string $a_bottomvalue)
 
 getBottomValue ()
 
 setLeftValue (string $a_leftvalue)
 
 getLeftValue ()
 
 setRightValue (string $a_rightvalue)
 
 getRightValue ()
 
 checkInput ()
 
 getInput ()
 
 insert (ilTemplate $a_tpl)
 
 setValueByArray (array $a_values)
 
- Public Member Functions inherited from ilFormPropertyGUI
 __construct (string $a_title="", string $a_postvar="")
 
 executeCommand ()
 
 getType ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setPostVar (string $a_postvar)
 
 getPostVar ()
 
 getFieldId ()
 
 setInfo (string $a_info)
 
 getInfo ()
 
 setAlert (string $a_alert)
 
 getAlert ()
 
 setRequired (bool $a_required)
 
 getRequired ()
 
 setDisabled (bool $a_disabled)
 
 getDisabled ()
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 setParentForm (ilPropertyFormGUI $a_parentform)
 
 getParentForm ()
 
 setParent (ilFormPropertyGUI $a_val)
 
 getParent ()
 
 getSubForm ()
 
 hideSubForm ()
 
 setHiddenTitle (string $a_val)
 
 getHiddenTitle ()
 
 getItemByPostVar (string $a_post_var)
 Get item by post var. More...
 
 serializeData ()
 
 unserializeData (string $a_data)
 
 setParentTable ($a_val)
 Set parent table. More...
 
 getParentTable ()
 Get parent table. More...
 
 writeToSession ()
 
 clearFromSession ()
 
 readFromSession ()
 
 getHiddenTag (string $a_post_var, string $a_value)
 
 setMulti (bool $a_multi, bool $a_sortable=false, bool $a_addremove=true)
 
 getMulti ()
 
 setMultiValues (array $a_values)
 
 getMultiValues ()
 
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g. More...
 
 stripSlashesAddSpaceFallback (string $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...
 
 setRequestParam (string $key, $val)
 This writes the request (aka post) values. More...
 

Protected Attributes

string $rightvalue = ""
 
string $leftvalue = ""
 
string $bottomvalue = ""
 
string $topvalue = ""
 
string $allvalue = ""
 
array $dirs = []
 
ilObjUser $user
 
string $value = ""
 
- Protected Attributes inherited from ilFormPropertyGUI
array $set_params = []
 
ilTable2GUI $parent_table = null
 
ilFormPropertyGUI $parent_gui = null
 
ilCtrl $ctrl
 
ilLanguage $lng
 
string $type = ""
 
string $title = ""
 
string $postvar = ""
 
string $info = ""
 
string $alert = ""
 
bool $required = false
 
ilPropertyFormGUI $parentform = null
 
string $hidden_title = ""
 
bool $multi = false
 
bool $multi_sortable = false
 
bool $multi_addremove = true
 
array $multi_values = []
 
RequestInterface $request
 
HTTP Services $http
 
Refinery Factory $refinery = null
 
bool $disabled = false
 
ilGlobalTemplateInterface $global_tpl = null
 

Additional Inherited Members

- Static Public Member Functions inherited from ilFormPropertyGUI
static removeProhibitedCharacters (string $a_text)
 Remove prohibited characters see #19159. More...
 
- Protected Member Functions inherited from ilFormPropertyGUI
 symbol ()
 
 setType (string $a_type)
 
 checkParentFormTable ()
 
 getSessionKey ()
 
 getMultiIconsHTML ()
 
 int ($key)
 
 intArray ($key)
 
 str ($key)
 
 raw ($key)
 
 strArray ($key)
 
 arrayArray ($key)
 
 isRequestParamArray (string $key)
 
 getRequestParam (string $key, Refinery\Transformation $t)
 

Detailed Description

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

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Constructor & Destructor Documentation

◆ __construct()

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

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

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

41  {
42  global $DIC;
43 
44  $this->lng = $DIC->language();
45  $this->user = $DIC->user();
46  parent::__construct($a_title, $a_postvar);
47  $this->setType("border_style");
48  $this->dirs = array("all", "top", "bottom", "left", "right");
49  }
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ checkInput()

ilTRBLBorderStyleInputGUI::checkInput ( )

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

References getInput(), setAllValue(), setBottomValue(), setLeftValue(), setRightValue(), and setTopValue().

101  : bool
102  {
103  $input = $this->getInput();
104 
105  foreach ($this->dirs as $dir) {
106  $pre_value = $input[$dir]["pre_value"];
107 
108  /*
109  if ($this->getRequired() && trim($num_value) == "")
110  {
111  $this->setAlert($lng->txt("msg_input_is_required"));
112 
113  return false;
114  }*/
115 
116  $value = $pre_value;
117 
118  if (trim($value) != "") {
119  switch ($dir) {
120  case "all": $this->setAllValue($value);
121  break;
122  case "top": $this->setTopValue($value);
123  break;
124  case "bottom": $this->setBottomValue($value);
125  break;
126  case "left": $this->setLeftValue($value);
127  break;
128  case "right": $this->setRightValue($value);
129  break;
130  }
131  }
132  }
133 
134  return true;
135  }
+ Here is the call graph for this function:

◆ getAllValue()

ilTRBLBorderStyleInputGUI::getAllValue ( )

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

References $allvalue.

Referenced by insert().

56  : string
57  {
58  return $this->allvalue;
59  }
+ Here is the caller graph for this function:

◆ getBottomValue()

ilTRBLBorderStyleInputGUI::getBottomValue ( )

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

References $bottomvalue.

Referenced by insert().

76  : string
77  {
78  return $this->bottomvalue;
79  }
+ Here is the caller graph for this function:

◆ getInput()

ilTRBLBorderStyleInputGUI::getInput ( )

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

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

Referenced by checkInput().

137  : array
138  {
139  return $this->arrayArray($this->getPostVar());
140  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLeftValue()

ilTRBLBorderStyleInputGUI::getLeftValue ( )

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

References $leftvalue.

Referenced by insert().

86  : string
87  {
88  return $this->leftvalue;
89  }
+ Here is the caller graph for this function:

◆ getRightValue()

ilTRBLBorderStyleInputGUI::getRightValue ( )

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

References $rightvalue.

Referenced by insert().

96  : string
97  {
98  return $this->rightvalue;
99  }
+ Here is the caller graph for this function:

◆ getTopValue()

ilTRBLBorderStyleInputGUI::getTopValue ( )

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

References $topvalue.

Referenced by insert().

66  : string
67  {
68  return $this->topvalue;
69  }
+ Here is the caller graph for this function:

◆ insert()

ilTRBLBorderStyleInputGUI::insert ( ilTemplate  $a_tpl)

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

References ilFormPropertyGUI\$lng, ilObjStyleSheet\_getStyleParameterValues(), getAllValue(), getBottomValue(), getLeftValue(), ilFormPropertyGUI\getPostVar(), getRightValue(), getTopValue(), ilTemplate\parseCurrentBlock(), ilTemplate\setCurrentBlock(), HTML_Template_IT\setVariable(), and ilLanguage\txt().

142  : void
143  {
144  $lng = $this->lng;
145  $value = "";
146  $layout_tpl = new ilTemplate("tpl.prop_trbl_layout.html", true, true, "components/ILIAS/Style/Content");
147 
148  foreach ($this->dirs as $dir) {
149  $tpl = new ilTemplate("tpl.prop_trbl_select.html", true, true, "components/ILIAS/Style/Content");
150  $pre_options = array_merge(
151  array("" => ""),
153  );
154 
155  switch ($dir) {
156  case "all": $value = strtolower(trim($this->getAllValue()));
157  break;
158  case "top": $value = strtolower(trim($this->getTopValue()));
159  break;
160  case "bottom": $value = strtolower(trim($this->getBottomValue()));
161  break;
162  case "left": $value = strtolower(trim($this->getLeftValue()));
163  break;
164  case "right": $value = strtolower(trim($this->getRightValue()));
165  break;
166  }
167 
168  foreach ($pre_options as $option) {
169  $tpl->setCurrentBlock("pre_option");
170  $tpl->setVariable("VAL_PRE", $option);
171  $tpl->setVariable("TXT_PRE", $option);
172  if ($value == $option) {
173  $tpl->setVariable("PRE_SELECTED", 'selected="selected"');
174  }
175  $tpl->parseCurrentBlock();
176  }
177 
178  $tpl->setVariable("POSTVAR", $this->getPostVar());
179  $tpl->setVariable("TXT_DIR", $lng->txt("sty_$dir"));
180  $tpl->setVariable("DIR", $dir);
181 
182  $layout_tpl->setVariable(strtoupper($dir), $tpl->get());
183  }
184 
185  $a_tpl->setCurrentBlock("prop_generic");
186  $a_tpl->setVariable("PROP_GENERIC", $layout_tpl->get());
187  $a_tpl->parseCurrentBlock();
188  }
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:544
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
static _getStyleParameterValues(string $par)
+ Here is the call graph for this function:

◆ setAllValue()

ilTRBLBorderStyleInputGUI::setAllValue ( string  $a_allvalue)

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

Referenced by checkInput(), and setValueByArray().

51  : void
52  {
53  $this->allvalue = $a_allvalue;
54  }
+ Here is the caller graph for this function:

◆ setBottomValue()

ilTRBLBorderStyleInputGUI::setBottomValue ( string  $a_bottomvalue)

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

Referenced by checkInput(), and setValueByArray().

71  : void
72  {
73  $this->bottomvalue = $a_bottomvalue;
74  }
+ Here is the caller graph for this function:

◆ setLeftValue()

ilTRBLBorderStyleInputGUI::setLeftValue ( string  $a_leftvalue)

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

Referenced by checkInput(), and setValueByArray().

81  : void
82  {
83  $this->leftvalue = $a_leftvalue;
84  }
+ Here is the caller graph for this function:

◆ setRightValue()

ilTRBLBorderStyleInputGUI::setRightValue ( string  $a_rightvalue)

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

Referenced by checkInput(), and setValueByArray().

91  : void
92  {
93  $this->rightvalue = $a_rightvalue;
94  }
+ Here is the caller graph for this function:

◆ setTopValue()

ilTRBLBorderStyleInputGUI::setTopValue ( string  $a_topvalue)

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

Referenced by checkInput(), and setValueByArray().

61  : void
62  {
63  $this->topvalue = $a_topvalue;
64  }
+ Here is the caller graph for this function:

◆ setValueByArray()

ilTRBLBorderStyleInputGUI::setValueByArray ( array  $a_values)

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

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

190  : void
191  {
192  $this->setAllValue($a_values[$this->getPostVar()]["all"]["pre_value"]);
193  $this->setBottomValue($a_values[$this->getPostVar()]["bottom"]["pre_value"]);
194  $this->setTopValue($a_values[$this->getPostVar()]["top"]["pre_value"]);
195  $this->setLeftValue($a_values[$this->getPostVar()]["left"]["pre_value"]);
196  $this->setRightValue($a_values[$this->getPostVar()]["right"]["pre_value"]);
197  }
+ Here is the call graph for this function:

Field Documentation

◆ $allvalue

string ilTRBLBorderStyleInputGUI::$allvalue = ""
protected

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

Referenced by getAllValue().

◆ $bottomvalue

string ilTRBLBorderStyleInputGUI::$bottomvalue = ""
protected

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

Referenced by getBottomValue().

◆ $dirs

array ilTRBLBorderStyleInputGUI::$dirs = []
protected

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

◆ $leftvalue

string ilTRBLBorderStyleInputGUI::$leftvalue = ""
protected

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

Referenced by getLeftValue().

◆ $rightvalue

string ilTRBLBorderStyleInputGUI::$rightvalue = ""
protected

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

Referenced by getRightValue().

◆ $topvalue

string ilTRBLBorderStyleInputGUI::$topvalue = ""
protected

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

Referenced by getTopValue().

◆ $user

ilObjUser ilTRBLBorderStyleInputGUI::$user
protected

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

◆ $value

string ilTRBLBorderStyleInputGUI::$value = ""
protected

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


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