ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilTRBLBorderStyleInputGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 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
 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 file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning 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: feed.php:28
__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); break;
121  case "top": $this->setTopValue($value); break;
122  case "bottom": $this->setBottomValue($value); break;
123  case "left": $this->setLeftValue($value); break;
124  case "right": $this->setRightValue($value); break;
125  }
126  }
127  }
128 
129  return true;
130  }
+ 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 132 of file class.ilTRBLBorderStyleInputGUI.php.

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

Referenced by checkInput().

132  : array
133  {
134  return $this->arrayArray($this->getPostVar());
135  }
+ 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 137 of file class.ilTRBLBorderStyleInputGUI.php.

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

137  : void
138  {
139  $lng = $this->lng;
140  $value = "";
141  $layout_tpl = new ilTemplate("tpl.prop_trbl_layout.html", true, true, "Services/Style/Content");
142 
143  foreach ($this->dirs as $dir) {
144  $tpl = new ilTemplate("tpl.prop_trbl_select.html", true, true, "Services/Style/Content");
145  $pre_options = array_merge(
146  array("" => ""),
148  );
149 
150  switch ($dir) {
151  case "all": $value = strtolower(trim($this->getAllValue())); break;
152  case "top": $value = strtolower(trim($this->getTopValue())); break;
153  case "bottom": $value = strtolower(trim($this->getBottomValue())); break;
154  case "left": $value = strtolower(trim($this->getLeftValue())); break;
155  case "right": $value = strtolower(trim($this->getRightValue())); break;
156  }
157 
158  foreach ($pre_options as $option) {
159  $tpl->setCurrentBlock("pre_option");
160  $tpl->setVariable("VAL_PRE", $option);
161  $tpl->setVariable("TXT_PRE", $option);
162  if ($value == $option) {
163  $tpl->setVariable("PRE_SELECTED", 'selected="selected"');
164  }
165  $tpl->parseCurrentBlock();
166  }
167 
168  $tpl->setVariable("POSTVAR", $this->getPostVar());
169  $tpl->setVariable("TXT_DIR", $lng->txt("sty_$dir"));
170  $tpl->setVariable("DIR", $dir);
171 
172  $layout_tpl->setVariable(strtoupper($dir), $tpl->get());
173  }
174 
175  $a_tpl->setCurrentBlock("prop_generic");
176  $a_tpl->setVariable("PROP_GENERIC", $layout_tpl->get());
177  $a_tpl->parseCurrentBlock();
178  }
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:514
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
static _getStyleParameterValues(string $par)
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
+ 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 180 of file class.ilTRBLBorderStyleInputGUI.php.

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

180  : void
181  {
182  $this->setAllValue($a_values[$this->getPostVar()]["all"]["pre_value"]);
183  $this->setBottomValue($a_values[$this->getPostVar()]["bottom"]["pre_value"]);
184  $this->setTopValue($a_values[$this->getPostVar()]["top"]["pre_value"]);
185  $this->setLeftValue($a_values[$this->getPostVar()]["left"]["pre_value"]);
186  $this->setRightValue($a_values[$this->getPostVar()]["right"]["pre_value"]);
187  }
+ 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: