ILIAS  release_8 Revision v8.24
ilOrgUnitMultiLineInputGUI 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 ilOrgUnitMultiLineInputGUI:
+ Collaboration diagram for ilOrgUnitMultiLineInputGUI:

Public Member Functions

 __construct (string $a_title="", string $a_postvar="")
 Constructor. More...
 
 getHook (string $key)
 
 addHook (string $key, array $options)
 
 removeHook (string $key)
 
 addInput (\ilFormPropertyGUI $input, array $options=array())
 
 getTemplateDir ()
 
 setTemplateDir (string $template_dir)
 
 isShowLabel ()
 
 setShowLabel (bool $show_label)
 
 getInputs ()
 
 setMulti (bool $a_multi, bool $a_sortable=false, bool $a_addremove=true)
 
 setValue (string $a_value)
 
 getValue ()
 
 setValueByArray (array $a_values)
 Set value by array. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 addCustomAttribute (string $key, string $value, bool $override=false)
 
 getCustomAttributes ()
 
 render (int $iterator_id=0, bool $clean_render=false)
 
 initCSSandJS ()
 
 insert (ilTemplate $a_tpl)
 
 getTableFilterHTML ()
 Get HTML for table filter. More...
 
 getToolbarHTML ()
 Get HTML for toolbar. More...
 
 isPositionMovable ()
 
 setPositionMovable (bool $position_movable)
 
 isShowLabelOnce ()
 
 setShowLabelOnce (bool $show_label_once)
 
 isShowInfo ()
 
 setShowInfo (bool $show_info)
 
- 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...
 

Data Fields

const HOOK_IS_LINE_REMOVABLE = "hook_is_line_removable"
 
const HOOK_IS_INPUT_DISABLED = "hook_is_disabled"
 
const HOOK_BEFORE_INPUT_RENDER = "hook_before_render"
 

Protected Attributes

array $cust_attr = array()
 
 $value
 
array $inputs = array()
 
array $input_options = array()
 
array $hooks = array()
 
array $line_values = array()
 
string $template_dir = ''
 
array $post_var_cache = array()
 
bool $show_label = false
 
bool $show_label_once = false
 
array $hidden_inputs = array()
 
bool $position_movable = false
 
int $counter = 0
 
bool $show_info = false
 
- 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
 

Private Member Functions

 createInputPostVar (string $iterator_id, \ilFormPropertyGUI $input)
 

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 Class ilOrgUnitMultiLineInputGUI

Author
Michael Herren mh@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

Definition at line 24 of file class.ilOrgUnitMultiLineInputGUI.php.

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost Variable

Reimplemented from ilFormPropertyGUI.

Definition at line 50 of file class.ilOrgUnitMultiLineInputGUI.php.

51 {
52 parent::__construct($a_title, $a_postvar);
53 $this->setType("line_select");
54 $this->setMulti(true);
55 $this->initCSSandJS();
56 }
setMulti(bool $a_multi, bool $a_sortable=false, bool $a_addremove=true)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct(), initCSSandJS(), setMulti(), and ilFormPropertyGUI\setType().

+ Here is the call graph for this function:

Member Function Documentation

◆ addCustomAttribute()

ilOrgUnitMultiLineInputGUI::addCustomAttribute ( string  $key,
string  $value,
bool  $override = false 
)

Definition at line 188 of file class.ilOrgUnitMultiLineInputGUI.php.

188 : void
189 {
190 if (isset($this->cust_attr[$key]) && !$override) {
191 $this->cust_attr[$key] .= ' ' . $value;
192 } else {
193 $this->cust_attr[$key] = $value;
194 }
195 }
string $key
Consumer key/client ID value.
Definition: System.php:193

References ILIAS\LTI\ToolProvider\$key, and $value.

Referenced by render().

+ Here is the caller graph for this function:

◆ addHook()

ilOrgUnitMultiLineInputGUI::addHook ( string  $key,
array  $options 
)

Definition at line 67 of file class.ilOrgUnitMultiLineInputGUI.php.

67 : void
68 {
69 $this->hooks[$key] = $options;
70 }

References ILIAS\LTI\ToolProvider\$key.

◆ addInput()

ilOrgUnitMultiLineInputGUI::addInput ( \ilFormPropertyGUI  $input,
array  $options = array() 
)

Definition at line 79 of file class.ilOrgUnitMultiLineInputGUI.php.

79 : void
80 {
81 $this->inputs[$input->getPostVar()] = $input;
82 $this->input_options[$input->getPostVar()] = $options;
83 $this->counter++;
84 }

References ilFormPropertyGUI\getPostVar().

+ Here is the call graph for this function:

◆ checkInput()

ilOrgUnitMultiLineInputGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Returns
bool Input ok, true/false

Reimplemented from ilFormPropertyGUI.

Definition at line 156 of file class.ilOrgUnitMultiLineInputGUI.php.

156 : bool
157 {
158 global $lng;
159 $valid = true;
160 // escape data
161 $out_array = array();
162 foreach ($_POST[$this->getPostVar()] as $item_num => $item) {
163 foreach ($this->inputs as $input_key => $input) {
164 if (isset($item[$input_key])) {
165 $out_array[$item_num][$input_key] = (is_string($item[$input_key])) ? \ilUtil::stripSlashes($item[$input_key]) : $item[$input_key];
166 }
167 }
168 }
169 $_POST[$this->getPostVar()] = $out_array;
170 if ($this->getRequired() && !trim(implode("", $_POST[$this->getPostVar()]))) {
171 $valid = false;
172 }
173 // validate
174 foreach ($this->inputs as $input_key => $inputs) {
175 if (!$inputs->checkInput()) {
176 $valid = false;
177 }
178 }
179 if (!$valid) {
180 $this->setAlert($lng->txt("msg_input_is_required"));
181
182 return false;
183 }
184
185 return $valid;
186 }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
$valid

References $inputs, ilFormPropertyGUI\$lng, $valid, ilFormPropertyGUI\getPostVar(), ilFormPropertyGUI\getRequired(), ilFormPropertyGUI\setAlert(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ createInputPostVar()

ilOrgUnitMultiLineInputGUI::createInputPostVar ( string  $iterator_id,
\ilFormPropertyGUI  $input 
)
private

Definition at line 202 of file class.ilOrgUnitMultiLineInputGUI.php.

202 : string
203 {
204 if ($this->getMulti()) {
205 return $this->getPostVar() . '[' . $iterator_id . '][' . $input->getPostVar() . ']';
206 } else {
207 return $this->getPostVar() . '[' . $input->getPostVar() . ']';
208 }
209 }

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

Referenced by render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCustomAttributes()

ilOrgUnitMultiLineInputGUI::getCustomAttributes ( )

Definition at line 197 of file class.ilOrgUnitMultiLineInputGUI.php.

197 : array
198 {
199 return (array) $this->cust_attr;
200 }

References $cust_attr.

Referenced by render().

+ Here is the caller graph for this function:

◆ getHook()

ilOrgUnitMultiLineInputGUI::getHook ( string  $key)

Definition at line 58 of file class.ilOrgUnitMultiLineInputGUI.php.

58 : ?string
59 {
60 if (isset($this->hooks[$key])) {
61 return $this->hooks[$key];
62 }
63
64 return false;
65 }

References ILIAS\LTI\ToolProvider\$key.

Referenced by render().

+ Here is the caller graph for this function:

◆ getInputs()

ilOrgUnitMultiLineInputGUI::getInputs ( )

Definition at line 106 of file class.ilOrgUnitMultiLineInputGUI.php.

106 : array
107 {
108 return $this->inputs;
109 }

References $inputs.

◆ getTableFilterHTML()

ilOrgUnitMultiLineInputGUI::getTableFilterHTML ( )

Get HTML for table filter.

Definition at line 371 of file class.ilOrgUnitMultiLineInputGUI.php.

372 {
373 return $this->render();
374 }
render(int $iterator_id=0, bool $clean_render=false)

References render().

+ Here is the call graph for this function:

◆ getTemplateDir()

ilOrgUnitMultiLineInputGUI::getTemplateDir ( )

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

86 : string
87 {
89 }

References $template_dir.

◆ getToolbarHTML()

ilOrgUnitMultiLineInputGUI::getToolbarHTML ( )

Get HTML for toolbar.

Definition at line 379 of file class.ilOrgUnitMultiLineInputGUI.php.

379 : string
380 {
381 return $this->render("toolbar");
382 }

References render().

+ Here is the call graph for this function:

◆ getValue()

ilOrgUnitMultiLineInputGUI::getValue ( )

Definition at line 128 of file class.ilOrgUnitMultiLineInputGUI.php.

128 : array
129 {
130 $out = array();
131 foreach ($this->inputs as $key => $item) {
132 $out[$key] = $item->getValue();
133 }
134
135 return $out;
136 }
$out
Definition: buildRTE.php:24

References ILIAS\LTI\ToolProvider\$key, and $out.

Referenced by render().

+ Here is the caller graph for this function:

◆ initCSSandJS()

ilOrgUnitMultiLineInputGUI::initCSSandJS ( )

Definition at line 337 of file class.ilOrgUnitMultiLineInputGUI.php.

337 : void
338 {
339 global $tpl;
340 $tpl->addJavascript('./Modules/OrgUnit/templates/default/multi_line_input.js');
341 }
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41

References $tpl.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ insert()

ilOrgUnitMultiLineInputGUI::insert ( ilTemplate  $a_tpl)

Definition at line 343 of file class.ilOrgUnitMultiLineInputGUI.php.

343 : int
344 {
345 $output = "";
346
347 $output .= $this->render(0, true);
348 if ($this->getMulti() && is_array($this->line_values) && count($this->line_values) > 0) {
349 foreach ($this->line_values as $run => $data) {
350 $object = $this;
351 $object->setValue($data);
352 $output .= $object->render($run);
353 }
354 } else {
355 $output .= $this->render(0, true);
356 }
357 if ($this->getMulti()) {
358 $output = '<div id="' . $this->getFieldId() . '" class="multi_line_input">' . $output
359 . '</div>';
360 $output .= '<script type="text/javascript">$("#' . $this->getFieldId()
361 . '").multi_line_input(' . json_encode($this->input_options) . ')</script>';
362 }
363 $a_tpl->setCurrentBlock("prop_generic");
364 $a_tpl->setVariable("PROP_GENERIC", $output);
365 $a_tpl->parseCurrentBlock();
366 }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:514
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)

References $data, ilFormPropertyGUI\getFieldId(), ilFormPropertyGUI\getMulti(), ilTemplate\parseCurrentBlock(), render(), ilTemplate\setCurrentBlock(), and HTML_Template_IT\setVariable().

+ Here is the call graph for this function:

◆ isPositionMovable()

ilOrgUnitMultiLineInputGUI::isPositionMovable ( )

Definition at line 384 of file class.ilOrgUnitMultiLineInputGUI.php.

384 : bool
385 {
387 }

References $position_movable.

Referenced by render().

+ Here is the caller graph for this function:

◆ isShowInfo()

ilOrgUnitMultiLineInputGUI::isShowInfo ( )

Definition at line 405 of file class.ilOrgUnitMultiLineInputGUI.php.

405 : bool
406 {
407 return $this->show_info;
408 }

References $show_info.

Referenced by render().

+ Here is the caller graph for this function:

◆ isShowLabel()

ilOrgUnitMultiLineInputGUI::isShowLabel ( )

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

References $show_label.

Referenced by render().

+ Here is the caller graph for this function:

◆ isShowLabelOnce()

ilOrgUnitMultiLineInputGUI::isShowLabelOnce ( )

Definition at line 394 of file class.ilOrgUnitMultiLineInputGUI.php.

394 : bool
395 {
397 }

References $show_label_once.

Referenced by render().

+ Here is the caller graph for this function:

◆ removeHook()

ilOrgUnitMultiLineInputGUI::removeHook ( string  $key)

Definition at line 72 of file class.ilOrgUnitMultiLineInputGUI.php.

72 : void
73 {
74 if (isset($this->hooks[$key])) {
75 unset($this->hooks[$key]);
76 }
77 }

References ILIAS\LTI\ToolProvider\$key.

◆ render()

ilOrgUnitMultiLineInputGUI::render ( int  $iterator_id = 0,
bool  $clean_render = false 
)
Exceptions
ilTemplateException
ilException

Definition at line 215 of file class.ilOrgUnitMultiLineInputGUI.php.

215 : string
216 {
217 $first_label = true;
218 $tpl = new \ilTemplate(
219 "tpl.multi_line_input.html",
220 true,
221 true,
222 'Customizing/global/plugins/Services/Repository/RepositoryObject/LiveVoting'
223 );
224 $class = 'multi_input_line';
225 $this->addCustomAttribute('class', $class, true);
226 foreach ($this->getCustomAttributes() as $key => $value) {
227 $tpl->setCurrentBlock('cust_attr');
228 $tpl->setVariable('CUSTOM_ATTR_KEY', $key);
229 $tpl->setVariable('CUSTOM_ATTR_VALUE', $value);
230 $tpl->parseCurrentBlock();
231 }
233 foreach ($inputs as $key => $input) {
234 $input = clone $input;
235 $is_hidden = false;
236 $is_ta = false;
237 if (!method_exists($input, 'render')) {
238 switch (true) {
239 case ($input instanceof \ilHiddenInputGUI):
240 $is_hidden = true;
241 break;
242 case ($input instanceof \ilTextAreaInputGUI):
243 $is_ta = true;
244 break;
245 default:
246 throw new \ilException("Method " . get_class($input)
247 . "::render() does not exists! You cannot use this input-type in ilMultiLineInputGUI");
248 }
249 }
250
251 $is_disabled_hook = $this->getHook(self::HOOK_IS_INPUT_DISABLED);
252 if ($is_disabled_hook !== false && !$clean_render) {
253 $input->setDisabled($is_disabled_hook($this->getValue()));
254 }
255 if ($this->getDisabled()) {
256 $input->setDisabled(true);
257 }
258 if ($iterator_id == 0 && !isset($this->post_var_cache[$key])) {
259 $this->post_var_cache[$key] = $input->getPostVar();
260 } else {
261 // Reset post var
262 $input->setPostVar($this->post_var_cache[$key]);
263 }
264 $post_var = $this->createInputPostVar($iterator_id, $input);
265 $input->setPostVar($post_var);
266 $before_render_hook = $this->getHook(self::HOOK_BEFORE_INPUT_RENDER);
267 if ($before_render_hook !== false && !$clean_render) {
268 $input = $before_render_hook($this->getValue(), $key, $input);
269 }
270 switch (true) {
271 case $is_hidden:
272 $tpl->setCurrentBlock('hidden');
273 $tpl->setVariable('NAME', $post_var);
274 $tpl->setVariable('VALUE', ilLegacyFormElementsUtil::prepareFormOutput($input->getValue()));
275 break;
276 case $is_ta:
277 if ($this->isShowLabel() || ($this->isShowLabelOnce() && $first_label)) {
278 $tpl->setCurrentBlock('input_label');
279 $tpl->setVariable('LABEL', $input->getTitle());
280 $tpl->setVariable('CONTENT', $input->getHTML());
281 $tpl->parseCurrentBlock();
282 $first_label = false;
283 } else {
284 $tpl->setCurrentBlock('input');
285 $tpl->setVariable('CONTENT', $input->getHTML());
286 }
287 break;
288 default:
289 if ($this->isShowLabel() || ($this->isShowLabelOnce() && $first_label)) {
290 $tpl->setCurrentBlock('input_label');
291 $tpl->setVariable('LABEL', $input->getTitle());
292 $tpl->setVariable('CONTENT', $input->render());
293 $first_label = false;
294 } else {
295 $tpl->setCurrentBlock('input');
296 $tpl->setVariable('CONTENT', $input->render());
297 }
298 break;
299 }
300 if ($this->isShowInfo()) {
301 if ($this->isShowLabel()) {
302 $tpl->setCurrentBlock('input_info_label');
303 $tpl->setVariable('INFO_LABEL', $input->getInfo());
304 $tpl->parseCurrentBlock();
305 } else {
306 $tpl->setCurrentBlock('input_info');
307 $tpl->setVariable('INFO', $input->getInfo());
308 $tpl->parseCurrentBlock();
309 }
310 }
311 $tpl->parseCurrentBlock();
312 }
313 if ($this->getMulti() && !$this->getDisabled()) {
314 $image_plus = xlvoGlyphGUI::get('plus');
315 $show_remove = true;
316 $is_removeable_hook = $this->getHook(self::HOOK_IS_LINE_REMOVABLE);
317 if ($is_removeable_hook !== false && !$clean_render) {
318 $show_remove = $is_removeable_hook($this->getValue());
319 }
320 $show_remove = true;
321 $image_minus = ($show_remove) ? xlvoGlyphGUI::get('minus') : '<span class="glyphicon glyphicon-minus hide"></span>';
322 $tpl->setCurrentBlock('multi_icons');
323 $tpl->setVariable('IMAGE_PLUS', $image_plus);
324 $tpl->setVariable('IMAGE_MINUS', $image_minus);
325 $tpl->parseCurrentBlock();
326 if ($this->isPositionMovable()) {
327 $tpl->setCurrentBlock('multi_icons_move');
328 $tpl->setVariable('IMAGE_UP', xlvoGlyphGUI::get(xlvoGlyphGUI::UP));
329 $tpl->setVariable('IMAGE_DOWN', xlvoGlyphGUI::get(xlvoGlyphGUI::DOWN));
330 $tpl->parseCurrentBlock();
331 }
332 }
333
334 return $tpl->get();
335 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static prepareFormOutput($a_str, bool $a_strip=false)
createInputPostVar(string $iterator_id, \ilFormPropertyGUI $input)
addCustomAttribute(string $key, string $value, bool $override=false)
This class represents a text area property in a property form.
get(string $key, Refinery\Transformation $t)
Get passed parameter, if not data passed, get key from http request.

References $inputs, ILIAS\LTI\ToolProvider\$key, $tpl, $value, addCustomAttribute(), createInputPostVar(), ILIAS\Repository\get(), getCustomAttributes(), ilFormPropertyGUI\getDisabled(), getHook(), ilFormPropertyGUI\getMulti(), getValue(), isPositionMovable(), isShowInfo(), isShowLabel(), isShowLabelOnce(), and ilLegacyFormElementsUtil\prepareFormOutput().

Referenced by getTableFilterHTML(), getToolbarHTML(), and insert().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setMulti()

ilOrgUnitMultiLineInputGUI::setMulti ( bool  $a_multi,
bool  $a_sortable = false,
bool  $a_addremove = true 
)

Reimplemented from ilFormPropertyGUI.

Definition at line 111 of file class.ilOrgUnitMultiLineInputGUI.php.

111 : void
112 {
113 $this->multi = $a_multi;
114 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setPositionMovable()

ilOrgUnitMultiLineInputGUI::setPositionMovable ( bool  $position_movable)

Definition at line 389 of file class.ilOrgUnitMultiLineInputGUI.php.

390 {
391 $this->position_movable = $position_movable;
392 }

References $position_movable.

◆ setShowInfo()

ilOrgUnitMultiLineInputGUI::setShowInfo ( bool  $show_info)

Definition at line 410 of file class.ilOrgUnitMultiLineInputGUI.php.

410 : void
411 {
412 $this->show_info = $show_info;
413 }

References $show_info.

◆ setShowLabel()

ilOrgUnitMultiLineInputGUI::setShowLabel ( bool  $show_label)

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

102 {
103 $this->show_label = $show_label;
104 }

References $show_label.

Referenced by setShowLabelOnce().

+ Here is the caller graph for this function:

◆ setShowLabelOnce()

ilOrgUnitMultiLineInputGUI::setShowLabelOnce ( bool  $show_label_once)

Definition at line 399 of file class.ilOrgUnitMultiLineInputGUI.php.

399 : void
400 {
401 $this->setShowLabel(false);
402 $this->show_label_once = $show_label_once;
403 }

References $show_label_once, and setShowLabel().

+ Here is the call graph for this function:

◆ setTemplateDir()

ilOrgUnitMultiLineInputGUI::setTemplateDir ( string  $template_dir)

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

91 : void
92 {
93 $this->template_dir = $template_dir;
94 }

References $template_dir.

◆ setValue()

ilOrgUnitMultiLineInputGUI::setValue ( string  $a_value)

Definition at line 116 of file class.ilOrgUnitMultiLineInputGUI.php.

116 : void
117 {
118 foreach ($this->inputs as $key => $item) {
119 if (method_exists($item, 'setValue')) {
120 $item->setValue($a_value[$key]);
121 } elseif ($item instanceof \ilDateTimeInputGUI) {
122 $item->setDate(new \ilDate($a_value[$key]['date'], IL_CAL_DATE));
123 }
124 }
125 $this->value = $a_value;
126 }
const IL_CAL_DATE
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class for single dates.

References ILIAS\LTI\ToolProvider\$key, and IL_CAL_DATE.

Referenced by setValueByArray().

+ Here is the caller graph for this function:

◆ setValueByArray()

ilOrgUnitMultiLineInputGUI::setValueByArray ( array  $a_values)

Set value by array.

Parameters
array$a_valuesvalue array

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

142 : void
143 {
144 $data = $a_values[$this->getPostVar()];
145 if ($this->getMulti()) {
146 $this->line_values = $data;
147 } else {
148 $this->setValue($data);
149 }
150 }

References $data, ilFormPropertyGUI\getMulti(), ilFormPropertyGUI\getPostVar(), and setValue().

+ Here is the call graph for this function:

Field Documentation

◆ $counter

int ilOrgUnitMultiLineInputGUI::$counter = 0
protected

Definition at line 42 of file class.ilOrgUnitMultiLineInputGUI.php.

◆ $cust_attr

array ilOrgUnitMultiLineInputGUI::$cust_attr = array()
protected

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

Referenced by getCustomAttributes().

◆ $hidden_inputs

array ilOrgUnitMultiLineInputGUI::$hidden_inputs = array()
protected

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

◆ $hooks

array ilOrgUnitMultiLineInputGUI::$hooks = array()
protected

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

◆ $input_options

array ilOrgUnitMultiLineInputGUI::$input_options = array()
protected

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

◆ $inputs

array ilOrgUnitMultiLineInputGUI::$inputs = array()
protected

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

Referenced by checkInput(), getInputs(), and render().

◆ $line_values

array ilOrgUnitMultiLineInputGUI::$line_values = array()
protected

Definition at line 35 of file class.ilOrgUnitMultiLineInputGUI.php.

◆ $position_movable

bool ilOrgUnitMultiLineInputGUI::$position_movable = false
protected

Definition at line 41 of file class.ilOrgUnitMultiLineInputGUI.php.

Referenced by isPositionMovable(), and setPositionMovable().

◆ $post_var_cache

array ilOrgUnitMultiLineInputGUI::$post_var_cache = array()
protected

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

◆ $show_info

bool ilOrgUnitMultiLineInputGUI::$show_info = false
protected

Definition at line 43 of file class.ilOrgUnitMultiLineInputGUI.php.

Referenced by isShowInfo(), and setShowInfo().

◆ $show_label

bool ilOrgUnitMultiLineInputGUI::$show_label = false
protected

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

Referenced by isShowLabel(), and setShowLabel().

◆ $show_label_once

bool ilOrgUnitMultiLineInputGUI::$show_label_once = false
protected

Definition at line 39 of file class.ilOrgUnitMultiLineInputGUI.php.

Referenced by isShowLabelOnce(), and setShowLabelOnce().

◆ $template_dir

string ilOrgUnitMultiLineInputGUI::$template_dir = ''
protected

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

Referenced by getTemplateDir(), and setTemplateDir().

◆ $value

ilOrgUnitMultiLineInputGUI::$value
protected

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

Referenced by addCustomAttribute(), and render().

◆ HOOK_BEFORE_INPUT_RENDER

const ilOrgUnitMultiLineInputGUI::HOOK_BEFORE_INPUT_RENDER = "hook_before_render"

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

◆ HOOK_IS_INPUT_DISABLED

const ilOrgUnitMultiLineInputGUI::HOOK_IS_INPUT_DISABLED = "hook_is_disabled"

Definition at line 27 of file class.ilOrgUnitMultiLineInputGUI.php.

◆ HOOK_IS_LINE_REMOVABLE

const ilOrgUnitMultiLineInputGUI::HOOK_IS_LINE_REMOVABLE = "hook_is_line_removable"

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


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