ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
ilTextAreaInputGUI Class Reference

This class represents a text area property in a property form. More...

+ Inheritance diagram for ilTextAreaInputGUI:
+ Collaboration diagram for ilTextAreaInputGUI:

Public Member Functions

 __construct (string $a_title="", string $a_postvar="")
 
 setValue (string $a_value)
 
 getValue ()
 
 setCols (int $a_cols)
 
 getCols ()
 
 setRows (int $a_rows)
 
 getRows ()
 
 setMaxNumOfChars (int $a_number)
 
 getMaxNumOfChars ()
 
 setMinNumOfChars (int $a_number)
 
 getMinNumOfChars ()
 
 setUseRte (bool $a_usert, string $version='')
 
 getUseRte ()
 
 addPlugin (string $a_plugin)
 
 removePlugin (string $a_plugin)
 
 addButton (string $a_button)
 
 removeButton (string $a_button)
 
 setRTESupport (int $obj_id, string $obj_type, string $module, ?string $cfg_template=null, bool $hide_switch=false, ?string $version=null)
 Set RTE support for a special module. More...
 
 removeRTESupport ()
 
 setRteTags (array $a_rtetags)
 
 getRteTags ()
 
 setRteTagSet (string $a_set_name)
 
 getRteTagSet ($a_set_name)
 
 getRteTagString ()
 
 setUseTagsForRteOnly (bool $a_val)
 Set use tags for RTE only (default is true) More...
 
 getUseTagsForRteOnly ()
 
 setValueByArray (array $a_values)
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 getInput ()
 
 insert (ilTemplate $a_tpl)
 
 usePurifier (?bool $a_flag=null)
 Setter/Getter for the html purifier usage. More...
 
 setPurifier (ilHtmlPurifierInterface $Purifier)
 Setter for the html purifier. More...
 
 getPurifier ()
 
 setRTERootBlockElement (?string $a_root_block_element)
 
 getRTERootBlockElement ()
 
 disableButtons ($a_button)
 Sets buttons which should be disabled in TinyMCE. More...
 
 getDisabledButtons (bool $as_array=true)
 
 getInitialRteWidth ()
 
 setInitialRteWidth (int $initial_rte_width)
 
 isCharLimited ()
 
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem (ilFormPropertyGUI $a_item)
 
 getSubItems ()
 
 getSubInputItemsRecursive ()
 returns a flat array of possibly existing subitems recursively More...
 
 checkSubItemsInput ()
 Check SubItems. More...
 
 getSubForm ()
 
 getItemByPostVar (string $a_post_var)
 Get item by post var. More...
 
- 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

array $rteSupport = []
 
string $value = ""
 
int $cols = 30
 
int $rows = 5
 
bool $usert = false
 
array $rtetags = []
 
array $plugins = []
 
array $removeplugins = []
 
array $buttons = []
 
array $rtesupport = []
 
bool $use_tags_for_rte_only = true
 
int $max_num_chars = 0
 
int $min_num_chars = 0
 
int $initial_rte_width = 795
 
array $disabled_buttons = array()
 
bool $usePurifier = false
 
ilHtmlPurifierInterface $Purifier = null
 
string $root_block_element = null
 
array $rte_tag_set
 
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
array $sub_items = array()
 
- 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 Attributes

ilObjUser $user
 

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 text area property in a property form.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de
Deprecated:
12 This component will be removed with ILIAS 12

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

Constructor & Destructor Documentation

◆ __construct()

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

Reimplemented from ilFormPropertyGUI.

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

82 {
83 global $DIC;
84
85 $this->lng = $DIC->language();
86 $this->user = $DIC->user();
87 parent::__construct($a_title, $a_postvar);
88 $this->setType("textarea");
89 $this->setRteTagSet("standard");
90 $this->plugins = array();
91 $this->removeplugins = array();
92 $this->buttons = array();
93 $this->rteSupport = array();
94 }
setRteTagSet(string $a_set_name)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ addButton()

ilTextAreaInputGUI::addButton ( string  $a_button)

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

173 : void
174 {
175 $this->buttons[$a_button] = $a_button;
176 }

◆ addPlugin()

ilTextAreaInputGUI::addPlugin ( string  $a_plugin)

Definition at line 162 of file class.ilTextAreaInputGUI.php.

162 : void
163 {
164 $this->plugins[$a_plugin] = $a_plugin;
165 }

◆ checkInput()

ilTextAreaInputGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Reimplemented from ilFormPropertyGUI.

Definition at line 264 of file class.ilTextAreaInputGUI.php.

264 : bool
265 {
267
268 $value = $this->getInput();
269 if ($this->getRequired() && trim($value) == "") {
270 $this->setAlert($lng->txt("msg_input_is_required"));
271 return false;
272 }
273
274 if ($this->isCharLimited()) {
275 $chars_entered = mb_strlen($value);
276
277 if ($this->getMaxNumOfChars() && ($chars_entered > $this->getMaxNumOfChars())) {
278 $this->setAlert($lng->txt("msg_input_char_limit_max"));
279 return false;
280 } elseif ($this->getMinNumOfChars() && ($chars_entered < $this->getMinNumOfChars())) {
281 $this->setAlert($lng->txt("msg_input_char_limit_min"));
282 return false;
283 }
284 }
285
286 return $this->checkSubItemsInput();
287 }
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...

References $lng.

◆ disableButtons()

ilTextAreaInputGUI::disableButtons (   $a_button)

Sets buttons which should be disabled in TinyMCE.

Parameters
string | string[]$a_buttonEither a button string or an array of button strings

Definition at line 489 of file class.ilTextAreaInputGUI.php.

489 : self
490 {
491 if (is_array($a_button)) {
492 $this->disabled_buttons = array_unique(array_merge($this->disabled_buttons, $a_button));
493 } else {
494 $this->disabled_buttons = array_unique(array_merge($this->disabled_buttons, array($a_button)));
495 }
496 return $this;
497 }

◆ getCols()

ilTextAreaInputGUI::getCols ( )

Definition at line 115 of file class.ilTextAreaInputGUI.php.

115 : int
116 {
117 return $this->cols;
118 }

References $cols.

◆ getDisabledButtons()

ilTextAreaInputGUI::getDisabledButtons ( bool  $as_array = true)
Returns
string|array Array of disabled buttons

Definition at line 502 of file class.ilTextAreaInputGUI.php.

503 {
504 if (!$as_array) {
505 return implode(',', $this->disabled_buttons);
506 } else {
508 }
509 }

◆ getInitialRteWidth()

ilTextAreaInputGUI::getInitialRteWidth ( )

Definition at line 511 of file class.ilTextAreaInputGUI.php.

511 : int
512 {
514 }

◆ getInput()

ilTextAreaInputGUI::getInput ( )

Definition at line 289 of file class.ilTextAreaInputGUI.php.

289 : string
290 {
291 $raw_post_var = (string) ($this->raw($this->getPostVar()) ?? "");
292
293 if ($this->usePurifier() && $this->getPurifier()) {
294 $value = $this->getPurifier()->purify($raw_post_var);
295 } else {
296 $allowed = $this->getRteTagString();
297 if (isset($this->plugins["latex"]) && $this->plugins["latex"] == "latex" && !is_int(strpos($allowed, "<span>"))) {
298 $allowed .= "<span>";
299 }
300 $value = ($this->getUseRte() || !$this->getUseTagsForRteOnly())
301 ? ilUtil::stripSlashes($raw_post_var, true, $allowed)
302 : $this->str($this->getPostVar());
303 }
304
306
307 # Convert newline characters
308 $value = str_replace("\r\n", "\n", $value);
309
310 return $value;
311 }
static removeProhibitedCharacters(string $a_text)
Remove prohibited characters see #19159.
usePurifier(?bool $a_flag=null)
Setter/Getter for the html purifier usage.
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")

References ILIAS\Repository\raw(), ILIAS\Repository\str(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ getMaxNumOfChars()

ilTextAreaInputGUI::getMaxNumOfChars ( )

Definition at line 136 of file class.ilTextAreaInputGUI.php.

136 : int
137 {
139 }

References $max_num_chars.

◆ getMinNumOfChars()

ilTextAreaInputGUI::getMinNumOfChars ( )

Definition at line 146 of file class.ilTextAreaInputGUI.php.

146 : int
147 {
149 }

References $min_num_chars.

◆ getPurifier()

ilTextAreaInputGUI::getPurifier ( )

Definition at line 468 of file class.ilTextAreaInputGUI.php.

469 {
470 return $this->Purifier;
471 }
ilHtmlPurifierInterface $Purifier
Interface for html sanitizing functionality.

◆ getRows()

ilTextAreaInputGUI::getRows ( )

Definition at line 125 of file class.ilTextAreaInputGUI.php.

125 : int
126 {
127 return $this->rows;
128 }

References $rows.

◆ getRTERootBlockElement()

ilTextAreaInputGUI::getRTERootBlockElement ( )

Definition at line 479 of file class.ilTextAreaInputGUI.php.

479 : ?string
480 {
482 }

◆ getRteTags()

ilTextAreaInputGUI::getRteTags ( )

Definition at line 214 of file class.ilTextAreaInputGUI.php.

214 : array
215 {
216 return $this->rtetags;
217 }

◆ getRteTagSet()

ilTextAreaInputGUI::getRteTagSet (   $a_set_name)

Definition at line 228 of file class.ilTextAreaInputGUI.php.

228 : array
229 {
230 return $this->rte_tag_set[$a_set_name];
231 }

◆ getRteTagString()

ilTextAreaInputGUI::getRteTagString ( )

Definition at line 233 of file class.ilTextAreaInputGUI.php.

233 : string
234 {
235 $result = "";
236 foreach ($this->getRteTags() as $tag) {
237 $result .= "<$tag>";
238 }
239 return $result;
240 }

◆ getUseRte()

ilTextAreaInputGUI::getUseRte ( )

Definition at line 157 of file class.ilTextAreaInputGUI.php.

157 : bool
158 {
159 return $this->usert;
160 }

References $usert.

◆ getUseTagsForRteOnly()

ilTextAreaInputGUI::getUseTagsForRteOnly ( )

Definition at line 250 of file class.ilTextAreaInputGUI.php.

250 : bool
251 {
253 }

◆ getValue()

ilTextAreaInputGUI::getValue ( )

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

101 : string
102 {
103 return $this->value;
104 }

References $value.

◆ insert()

ilTextAreaInputGUI::insert ( ilTemplate  $a_tpl)

Definition at line 313 of file class.ilTextAreaInputGUI.php.

313 : void
314 {
316
317 $ttpl = new ilTemplate("tpl.prop_textarea.html", true, true, "components/ILIAS/Form");
318
319 if ($this->getInfo() !== '') {
320 $ttpl->setCurrentBlock('described_by_description');
321 $ttpl->setVariable('DESCRIBED_BY_DESCRIPTION_FIELD_ID', $this->getFieldId());
322 $ttpl->parseCurrentBlock();
323 }
324
325 // disabled rte
326 if ($this->getUseRte() && $this->getDisabled()) {
327 $ttpl->setCurrentBlock("disabled_rte");
328 $ttpl->setVariable("DR_VAL", $this->getValue());
329 } else {
330 if ($this->getUseRte()) {
331 $ttpl->touchBlock("rteditor");
332 $rtestring = ilRTE::_getRTEClassname();
333 $rte = new $rtestring((string) $this->rteSupport['version']);
334 $rte->setInitialWidth($this->getInitialRteWidth());
335
336 // @todo: Check this.
337 $rte->addPlugin("emoticons");
338 foreach ($this->plugins as $plugin) {
339 if (strlen($plugin)) {
340 $rte->addPlugin($plugin);
341 }
342 }
343 foreach ($this->removeplugins as $plugin) {
344 if (strlen($plugin)) {
345 $rte->removePlugin($plugin);
346 }
347 }
348
349 foreach ($this->buttons as $button) {
350 if (strlen($button)) {
351 $rte->addButton($button);
352 }
353 }
354
355 $rte->disableButtons($this->getDisabledButtons());
356
357 if ($this->getRTERootBlockElement() !== null) {
358 $rte->setRTERootBlockElement($this->getRTERootBlockElement());
359 }
360
361 if (count($this->rteSupport) >= 3) {
362 $rte->addRTESupport(
363 $this->lng,
364 $this->user,
365 $this->rteSupport["obj_id"],
366 $this->rteSupport["obj_type"],
367 $this->rteSupport["module"],
368 false,
369 $this->rteSupport['cfg_template']
370 );
371 } else {
372 // disable all plugins for mini-tagset
373 if (!array_diff($this->getRteTags(), $this->getRteTagSet("mini"))) {
374 $rte->removeAllPlugins();
375
376 // #13603 - "paste from word" is essential
377 $rte->addPlugin("paste");
378 //Add plugins 'lists', 'code' and 'link': in tinymce 3 it wasnt necessary to configure these plugins
379 $rte->addPlugin("lists");
380 $rte->addPlugin("link");
381 $rte->addPlugin("code");
382
383 if (method_exists($rte, 'removeAllContextMenuItems')) {
384 $rte->removeAllContextMenuItems(); //https://github.com/ILIAS-eLearning/ILIAS/pull/3088#issuecomment-805830050
385 }
386
387 // #11980 - p-tag is mandatory but we do not want the icons it comes with
388 $rte->disableButtons(array("anchor", "alignleft", "aligncenter",
389 "alignright", "alignjustify", "formatselect", "removeformat",
390 "cut", "copy", "paste", "pastetext")); // JF, 2013-12-09
391 }
392 $rte->addCustomRTESupport(0, "", $this->getRteTags());
393 }
394
395 $ttpl->touchBlock("prop_ta_w");
396 } else {
397 if ($this->getCols() > 5) {
398 $ttpl->setCurrentBlock("prop_ta_c");
399 $ttpl->setVariable("COLS", $this->getCols());
400 $ttpl->parseCurrentBlock();
401 } else {
402 $ttpl->touchBlock("prop_ta_w");
403 }
404 }
405 $ttpl->setCurrentBlock("prop_textarea");
406 $ttpl->setVariable("ROWS", $this->getRows());
407 $ttpl->setVariable("POST_VAR", $this->getPostVar());
408 $ttpl->setVariable("ID", $this->getFieldId());
409 if ($this->getDisabled()) {
410 $ttpl->setVariable('DISABLED', 'disabled="disabled" ');
411 }
412 $ttpl->setVariable("PROPERTY_VALUE", ilLegacyFormElementsUtil::prepareFormOutput($this->getValue()));
413
414 if ($this->getRequired()) {
415 $ttpl->setVariable("REQUIRED", "required=\"required\"");
416 }
417
418 if ($this->isCharLimited()) {
419 $ttpl->setVariable("MAXCHARS", $this->getMaxNumOfChars());
420 $ttpl->setVariable("MINCHARS", $this->getMinNumOfChars());
421
422 $lng->toJS("form_chars_remaining");
423 }
424 }
425 $ttpl->parseCurrentBlock();
426
427 if ($this->isCharLimited()) {
428 $ttpl->setVariable("FEEDBACK_MAX_LIMIT", $this->getMaxNumOfChars());
429 $ttpl->setVariable("FEEDBACK_ID", $this->getFieldId());
430 $ttpl->setVariable("CHARS_REMAINING", $lng->txt("form_chars_remaining"));
431 }
432
433 if ($this->getDisabled()) {
434 $ttpl->setVariable(
435 "HIDDEN_INPUT",
436 $this->getHiddenTag($this->getPostVar(), $this->getValue())
437 );
438 }
439 $a_tpl->setCurrentBlock("prop_generic");
440 $a_tpl->setVariable("PROP_GENERIC", $ttpl->get());
441 $a_tpl->parseCurrentBlock();
442 }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:544
getHiddenTag(string $a_post_var, string $a_value)
toJS($a_lang_key, ?ilGlobalTemplateInterface $a_tpl=null)
Transfer text to Javascript.
static prepareFormOutput($a_str, bool $a_strip=false)
static _getRTEClassname()
special template class to simplify handling of ITX/PEAR
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
getDisabledButtons(bool $as_array=true)

References $lng, XapiProxy\$plugin, ilRTE\_getRTEClassname(), ILIAS\UI\Implementation\Component\Input\getValue(), ILIAS\Repository\lng(), ilTemplate\parseCurrentBlock(), ilLegacyFormElementsUtil\prepareFormOutput(), ilTemplate\setCurrentBlock(), HTML_Template_IT\setVariable(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ isCharLimited()

ilTextAreaInputGUI::isCharLimited ( )

Definition at line 521 of file class.ilTextAreaInputGUI.php.

521 : bool
522 {
523 if ($this->getMaxNumOfChars() || $this->getMinNumOfChars()) {
524 return true;
525 }
526
527 return false;
528 }

◆ removeButton()

ilTextAreaInputGUI::removeButton ( string  $a_button)

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

178 : void
179 {
180 unset($this->buttons[$a_button]);
181 }

◆ removePlugin()

ilTextAreaInputGUI::removePlugin ( string  $a_plugin)

Definition at line 167 of file class.ilTextAreaInputGUI.php.

167 : void
168 {
169 $this->removeplugins[$a_plugin] = $a_plugin;
170 }

◆ removeRTESupport()

ilTextAreaInputGUI::removeRTESupport ( )

Definition at line 204 of file class.ilTextAreaInputGUI.php.

204 : void
205 {
206 $this->rteSupport = array();
207 }

◆ setCols()

ilTextAreaInputGUI::setCols ( int  $a_cols)
Deprecated:

Definition at line 109 of file class.ilTextAreaInputGUI.php.

109 : void
110 {
111 // obsolete because of bootstrap
112 $this->cols = $a_cols;
113 }

◆ setInitialRteWidth()

ilTextAreaInputGUI::setInitialRteWidth ( int  $initial_rte_width)

Definition at line 516 of file class.ilTextAreaInputGUI.php.

516 : void
517 {
518 $this->initial_rte_width = $initial_rte_width;
519 }

◆ setMaxNumOfChars()

ilTextAreaInputGUI::setMaxNumOfChars ( int  $a_number)

Definition at line 131 of file class.ilTextAreaInputGUI.php.

131 : void
132 {
133 $this->max_num_chars = $a_number;
134 }

◆ setMinNumOfChars()

ilTextAreaInputGUI::setMinNumOfChars ( int  $a_number)

Definition at line 141 of file class.ilTextAreaInputGUI.php.

141 : void
142 {
143 $this->min_num_chars = $a_number;
144 }

◆ setPurifier()

ilTextAreaInputGUI::setPurifier ( ilHtmlPurifierInterface  $Purifier)

Setter for the html purifier.

Definition at line 462 of file class.ilTextAreaInputGUI.php.

462 : self
463 {
464 $this->Purifier = $Purifier;
465 return $this;
466 }

◆ setRows()

ilTextAreaInputGUI::setRows ( int  $a_rows)

Definition at line 120 of file class.ilTextAreaInputGUI.php.

120 : void
121 {
122 $this->rows = $a_rows;
123 }

◆ setRTERootBlockElement()

ilTextAreaInputGUI::setRTERootBlockElement ( ?string  $a_root_block_element)

Definition at line 473 of file class.ilTextAreaInputGUI.php.

473 : self
474 {
475 $this->root_block_element = $a_root_block_element;
476 return $this;
477 }

◆ setRTESupport()

ilTextAreaInputGUI::setRTESupport ( int  $obj_id,
string  $obj_type,
string  $module,
?string  $cfg_template = null,
bool  $hide_switch = false,
?string  $version = null 
)

Set RTE support for a special module.

Definition at line 186 of file class.ilTextAreaInputGUI.php.

193 : void {
194 $this->rteSupport = array(
195 "obj_id" => $obj_id,
196 "obj_type" => $obj_type,
197 "module" => $module,
198 'cfg_template' => $cfg_template,
199 'hide_switch' => $hide_switch,
200 'version' => $version
201 );
202 }
$version
Definition: plugin.php:24

◆ setRteTags()

ilTextAreaInputGUI::setRteTags ( array  $a_rtetags)

Definition at line 209 of file class.ilTextAreaInputGUI.php.

209 : void
210 {
211 $this->rtetags = $a_rtetags;
212 }

◆ setRteTagSet()

ilTextAreaInputGUI::setRteTagSet ( string  $a_set_name)
Parameters
string$a_set_nameSet name "standard", "extended", "extended_img", "extended_table", "extended_table_img", "full"

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

223 : void
224 {
225 $this->setRteTags($this->rte_tag_set[$a_set_name]);
226 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setUseRte()

ilTextAreaInputGUI::setUseRte ( bool  $a_usert,
string  $version = '' 
)

Definition at line 151 of file class.ilTextAreaInputGUI.php.

151 : void
152 {
153 $this->usert = $a_usert;
154 $this->rteSupport['version'] = $version;
155 }

References $version.

◆ setUseTagsForRteOnly()

ilTextAreaInputGUI::setUseTagsForRteOnly ( bool  $a_val)

Set use tags for RTE only (default is true)

Definition at line 245 of file class.ilTextAreaInputGUI.php.

245 : void
246 {
247 $this->use_tags_for_rte_only = $a_val;
248 }

◆ setValue()

ilTextAreaInputGUI::setValue ( string  $a_value)

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

96 : void
97 {
98 $this->value = $a_value;
99 }

◆ setValueByArray()

ilTextAreaInputGUI::setValueByArray ( array  $a_values)

Definition at line 255 of file class.ilTextAreaInputGUI.php.

255 : void
256 {
257 $this->setValue($a_values[$this->getPostVar()] ?? "");
258
259 foreach ($this->getSubItems() as $item) {
260 $item->setValueByArray($a_values);
261 }
262 }

◆ usePurifier()

ilTextAreaInputGUI::usePurifier ( ?bool  $a_flag = null)

Setter/Getter for the html purifier usage.

Parameters
bool$a_flagUse purifier or not
Returns
self|bool

Definition at line 449 of file class.ilTextAreaInputGUI.php.

450 {
451 if (null === $a_flag) {
452 return $this->usePurifier;
453 }
454
455 $this->usePurifier = $a_flag;
456 return $this;
457 }

Field Documentation

◆ $buttons

array ilTextAreaInputGUI::$buttons = []
protected

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

◆ $cols

int ilTextAreaInputGUI::$cols = 30
protected

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

Referenced by getCols().

◆ $disabled_buttons

array ilTextAreaInputGUI::$disabled_buttons = array()
protected

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

◆ $initial_rte_width

int ilTextAreaInputGUI::$initial_rte_width = 795
protected

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

◆ $max_num_chars

int ilTextAreaInputGUI::$max_num_chars = 0
protected

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

Referenced by getMaxNumOfChars().

◆ $min_num_chars

int ilTextAreaInputGUI::$min_num_chars = 0
protected

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

Referenced by getMinNumOfChars().

◆ $plugins

array ilTextAreaInputGUI::$plugins = []
protected

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

◆ $Purifier

ilHtmlPurifierInterface ilTextAreaInputGUI::$Purifier = null
protected

Definition at line 45 of file class.ilTextAreaInputGUI.php.

◆ $removeplugins

array ilTextAreaInputGUI::$removeplugins = []
protected

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

◆ $root_block_element

string ilTextAreaInputGUI::$root_block_element = null
protected

Definition at line 46 of file class.ilTextAreaInputGUI.php.

◆ $rows

int ilTextAreaInputGUI::$rows = 5
protected

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

Referenced by getRows().

◆ $rte_tag_set

array ilTextAreaInputGUI::$rte_tag_set
protected
Initial value:
= array(
"mini" => array("strong", "em", "u", "ol", "li", "ul", "blockquote", "a", "p", "span", "br"),
"standard" => array("strong", "em", "u", "ol", "li", "ul", "p", "div",
"i", "b", "code", "sup", "sub", "pre", "strike", "gap"),
"extended" => array(
"a","blockquote","br","cite","code","div","em","h1","h2","h3",
"h4","h5","h6","hr","li","ol","p",
"pre","span","strike","strong","sub","sup","u","ul",
"i", "b", "gap"),
"extended_img" => array(
"a","blockquote","br","cite","code","div","em","h1","h2","h3",
"h4","h5","h6","hr","img","li","ol","p",
"pre","span","strike","strong","sub","sup","u","ul",
"i", "b", "gap"),
"extended_table" => array(
"a","blockquote","br","cite","code","div","em","h1","h2","h3",
"h4","h5","h6","hr","li","ol","p",
"pre","span","strike","strong","sub","sup","table","td",
"tr","u","ul", "i", "b", "gap"),
"extended_table_img" => array(
"a","blockquote","br","cite","code","div","em","h1","h2","h3",
"h4","h5","h6","hr","img","li","ol","p",
"pre","span","strike","strong","sub","sup","table","td",
"tr","u","ul", "i", "b", "gap"),
"full" => array(
"a","blockquote","br","cite","code","div","em","h1","h2","h3",
"h4","h5","h6","hr","img","li","ol","p",
"pre","span","strike","strong","sub","sup","table","td",
"tr","u","ul","ruby","rbc","rtc","rb","rt","rp", "i", "b", "gap"))

Definition at line 49 of file class.ilTextAreaInputGUI.php.

◆ $rteSupport

array ilTextAreaInputGUI::$rteSupport = []
protected

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

◆ $rtesupport

array ilTextAreaInputGUI::$rtesupport = []
protected

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

◆ $rtetags

array ilTextAreaInputGUI::$rtetags = []
protected

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

◆ $use_tags_for_rte_only

bool ilTextAreaInputGUI::$use_tags_for_rte_only = true
protected

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

◆ $usePurifier

bool ilTextAreaInputGUI::$usePurifier = false
protected

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

◆ $user

ilObjUser ilTextAreaInputGUI::$user
private

Definition at line 47 of file class.ilTextAreaInputGUI.php.

◆ $usert

bool ilTextAreaInputGUI::$usert = false
protected

Definition at line 33 of file class.ilTextAreaInputGUI.php.

Referenced by getUseRte().

◆ $value

string ilTextAreaInputGUI::$value = ""
protected

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

Referenced by getValue().


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