ILIAS  release_8 Revision v8.24
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
 

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 class represents a text area property 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.ilTextAreaInputGUI.php.

Constructor & Destructor Documentation

◆ __construct()

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

Reimplemented from ilFormPropertyGUI.

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

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

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

+ Here is the call graph for this function:

Member Function Documentation

◆ addButton()

ilTextAreaInputGUI::addButton ( string  $a_button)

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

170 : void
171 {
172 $this->buttons[$a_button] = $a_button;
173 }

◆ addPlugin()

ilTextAreaInputGUI::addPlugin ( string  $a_plugin)

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

159 : void
160 {
161 $this->plugins[$a_plugin] = $a_plugin;
162 }

◆ checkInput()

ilTextAreaInputGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Reimplemented from ilFormPropertyGUI.

Reimplemented in ilSamlIdpMetadataInputGUI.

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

261 : bool
262 {
264
265 $value = $this->getInput();
266 if ($this->getRequired() && trim($value) == "") {
267 $this->setAlert($lng->txt("msg_input_is_required"));
268 return false;
269 }
270
271 if ($this->isCharLimited()) {
272 //avoid whitespace surprises. #20630, #20674
273 $ascii_whitespaces = chr(194) . chr(160);
274 $ascii_breaklines = chr(13) . chr(10);
275
276 $to_replace = array($ascii_whitespaces, $ascii_breaklines, "<", ">", "&");
277 $replace_to = array(' ', '', "_", "_", "_");
278
279 #20630 mbstring extension is mandatory for 5.4
280 $chars_entered = mb_strlen(strip_tags(str_replace($to_replace, $replace_to, $value)));
281
282 if ($this->getMaxNumOfChars() && ($chars_entered > $this->getMaxNumOfChars())) {
283 $this->setAlert($lng->txt("msg_input_char_limit_max"));
284 return false;
285 } elseif ($this->getMinNumOfChars() && ($chars_entered < $this->getMinNumOfChars())) {
286 $this->setAlert($lng->txt("msg_input_char_limit_min"));
287 return false;
288 }
289 }
290
291 return $this->checkSubItemsInput();
292 }
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 481 of file class.ilTextAreaInputGUI.php.

481 : self
482 {
483 if (is_array($a_button)) {
484 $this->disabled_buttons = array_unique(array_merge($this->disabled_buttons, $a_button));
485 } else {
486 $this->disabled_buttons = array_unique(array_merge($this->disabled_buttons, array($a_button)));
487 }
488 return $this;
489 }

◆ getCols()

ilTextAreaInputGUI::getCols ( )

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

112 : int
113 {
114 return $this->cols;
115 }

References $cols.

◆ getDisabledButtons()

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

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

495 {
496 if (!$as_array) {
497 return implode(',', $this->disabled_buttons);
498 } else {
500 }
501 }

◆ getInitialRteWidth()

ilTextAreaInputGUI::getInitialRteWidth ( )

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

503 : int
504 {
506 }

◆ getInput()

ilTextAreaInputGUI::getInput ( )

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

294 : string
295 {
296 if ($this->usePurifier() && $this->getPurifier()) {
297 $value = $this->getPurifier()->purify($this->raw($this->getPostVar()));
298 } else {
299 $allowed = $this->getRteTagString();
300 if (isset($this->plugins["latex"]) && $this->plugins["latex"] == "latex" && !is_int(strpos($allowed, "<span>"))) {
301 $allowed .= "<span>";
302 }
303 $value = ($this->getUseRte() || !$this->getUseTagsForRteOnly())
304 ? ilUtil::stripSlashes($this->raw($this->getPostVar()), true, $allowed)
305 : $this->str($this->getPostVar());
306 }
307
309 return $value;
310 }
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 133 of file class.ilTextAreaInputGUI.php.

133 : int
134 {
136 }

References $max_num_chars.

◆ getMinNumOfChars()

ilTextAreaInputGUI::getMinNumOfChars ( )

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

143 : int
144 {
146 }

References $min_num_chars.

◆ getPurifier()

ilTextAreaInputGUI::getPurifier ( )

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

461 {
462 return $this->Purifier;
463 }
ilHtmlPurifierInterface $Purifier
Interface for html sanitizing functionality.

◆ getRows()

ilTextAreaInputGUI::getRows ( )

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

122 : int
123 {
124 return $this->rows;
125 }

References $rows.

◆ getRTERootBlockElement()

ilTextAreaInputGUI::getRTERootBlockElement ( )

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

471 : ?string
472 {
474 }

◆ getRteTags()

ilTextAreaInputGUI::getRteTags ( )

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

211 : array
212 {
213 return $this->rtetags;
214 }

◆ getRteTagSet()

ilTextAreaInputGUI::getRteTagSet (   $a_set_name)

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

225 : array
226 {
227 return $this->rte_tag_set[$a_set_name];
228 }

◆ getRteTagString()

ilTextAreaInputGUI::getRteTagString ( )

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

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

◆ getUseRte()

ilTextAreaInputGUI::getUseRte ( )

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

154 : bool
155 {
156 return $this->usert;
157 }

References $usert.

◆ getUseTagsForRteOnly()

ilTextAreaInputGUI::getUseTagsForRteOnly ( )

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

247 : bool
248 {
250 }

◆ getValue()

ilTextAreaInputGUI::getValue ( )

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

98 : string
99 {
100 return $this->value;
101 }

References $value.

◆ insert()

ilTextAreaInputGUI::insert ( ilTemplate  $a_tpl)

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

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

+ Here is the call graph for this function:

◆ isCharLimited()

ilTextAreaInputGUI::isCharLimited ( )

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

513 : bool
514 {
515 if ($this->getMaxNumOfChars() || $this->getMinNumOfChars()) {
516 return true;
517 }
518
519 return false;
520 }

◆ removeButton()

ilTextAreaInputGUI::removeButton ( string  $a_button)

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

175 : void
176 {
177 unset($this->buttons[$a_button]);
178 }

◆ removePlugin()

ilTextAreaInputGUI::removePlugin ( string  $a_plugin)

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

164 : void
165 {
166 $this->removeplugins[$a_plugin] = $a_plugin;
167 }

◆ removeRTESupport()

ilTextAreaInputGUI::removeRTESupport ( )

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

201 : void
202 {
203 $this->rteSupport = array();
204 }

◆ setCols()

ilTextAreaInputGUI::setCols ( int  $a_cols)
Deprecated:

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

106 : void
107 {
108 // obsolete because of bootstrap
109 $this->cols = $a_cols;
110 }

◆ setInitialRteWidth()

ilTextAreaInputGUI::setInitialRteWidth ( int  $initial_rte_width)

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

508 : void
509 {
510 $this->initial_rte_width = $initial_rte_width;
511 }

◆ setMaxNumOfChars()

ilTextAreaInputGUI::setMaxNumOfChars ( int  $a_number)

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

128 : void
129 {
130 $this->max_num_chars = $a_number;
131 }

◆ setMinNumOfChars()

ilTextAreaInputGUI::setMinNumOfChars ( int  $a_number)

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

138 : void
139 {
140 $this->min_num_chars = $a_number;
141 }

◆ setPurifier()

ilTextAreaInputGUI::setPurifier ( ilHtmlPurifierInterface  $Purifier)

Setter for the html purifier.

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

454 : self
455 {
456 $this->Purifier = $Purifier;
457 return $this;
458 }

◆ setRows()

ilTextAreaInputGUI::setRows ( int  $a_rows)

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

117 : void
118 {
119 $this->rows = $a_rows;
120 }

◆ setRTERootBlockElement()

ilTextAreaInputGUI::setRTERootBlockElement ( ?string  $a_root_block_element)

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

465 : self
466 {
467 $this->root_block_element = $a_root_block_element;
468 return $this;
469 }

◆ 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 183 of file class.ilTextAreaInputGUI.php.

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

◆ setRteTags()

ilTextAreaInputGUI::setRteTags ( array  $a_rtetags)

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

206 : void
207 {
208 $this->rtetags = $a_rtetags;
209 }

◆ 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 220 of file class.ilTextAreaInputGUI.php.

220 : void
221 {
222 $this->setRteTags($this->rte_tag_set[$a_set_name]);
223 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setUseRte()

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

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

148 : void
149 {
150 $this->usert = $a_usert;
151 $this->rteSupport['version'] = $version;
152 }

References $version.

◆ setUseTagsForRteOnly()

ilTextAreaInputGUI::setUseTagsForRteOnly ( bool  $a_val)

Set use tags for RTE only (default is true)

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

242 : void
243 {
244 $this->use_tags_for_rte_only = $a_val;
245 }

◆ setValue()

ilTextAreaInputGUI::setValue ( string  $a_value)

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

93 : void
94 {
95 $this->value = $a_value;
96 }

◆ setValueByArray()

ilTextAreaInputGUI::setValueByArray ( array  $a_values)

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

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

◆ 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 441 of file class.ilTextAreaInputGUI.php.

442 {
443 if (null === $a_flag) {
444 return $this->usePurifier;
445 }
446
447 $this->usePurifier = $a_flag;
448 return $this;
449 }

Field Documentation

◆ $buttons

array ilTextAreaInputGUI::$buttons = []
protected

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

◆ $cols

int ilTextAreaInputGUI::$cols = 30
protected

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

Referenced by getCols().

◆ $disabled_buttons

array ilTextAreaInputGUI::$disabled_buttons = array()
protected

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

◆ $initial_rte_width

int ilTextAreaInputGUI::$initial_rte_width = 795
protected

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

◆ $max_num_chars

int ilTextAreaInputGUI::$max_num_chars = 0
protected

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

Referenced by getMaxNumOfChars().

◆ $min_num_chars

int ilTextAreaInputGUI::$min_num_chars = 0
protected

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

Referenced by getMinNumOfChars().

◆ $plugins

array ilTextAreaInputGUI::$plugins = []
protected

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

◆ $Purifier

ilHtmlPurifierInterface ilTextAreaInputGUI::$Purifier = null
protected

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

◆ $removeplugins

array ilTextAreaInputGUI::$removeplugins = []
protected

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

◆ $root_block_element

string ilTextAreaInputGUI::$root_block_element = null
protected

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

◆ $rows

int ilTextAreaInputGUI::$rows = 5
protected

Definition at line 31 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 47 of file class.ilTextAreaInputGUI.php.

◆ $rteSupport

array ilTextAreaInputGUI::$rteSupport = []
protected

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

◆ $rtesupport

array ilTextAreaInputGUI::$rtesupport = []
protected

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

◆ $rtetags

array ilTextAreaInputGUI::$rtetags = []
protected

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

◆ $use_tags_for_rte_only

bool ilTextAreaInputGUI::$use_tags_for_rte_only = true
protected

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

◆ $usePurifier

bool ilTextAreaInputGUI::$usePurifier = false
protected

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

◆ $usert

bool ilTextAreaInputGUI::$usert = false
protected

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

Referenced by getUseRte().

◆ $value

string ilTextAreaInputGUI::$value = ""
protected

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

Referenced by getValue().


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