ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 ()
 
 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)
 
- 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
 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

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

Constructor & Destructor Documentation

◆ __construct()

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

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

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

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: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ 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 ( )

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

References ilFormPropertyGUI\$lng, ilSubEnabledFormPropertyGUI\checkSubItemsInput(), getInput(), getMaxNumOfChars(), getMinNumOfChars(), ilFormPropertyGUI\getRequired(), isCharLimited(), ilFormPropertyGUI\setAlert(), and ilLanguage\txt().

261  : bool
262  {
263  $lng = $this->lng;
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...
+ Here is the call graph for this function:

◆ disableButtons()

ilTextAreaInputGUI::disableButtons (   $a_button)

Sets buttons which should be disabled in TinyMCE.

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

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

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

◆ getCols()

ilTextAreaInputGUI::getCols ( )

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

References $cols.

Referenced by insert().

112  : int
113  {
114  return $this->cols;
115  }
+ Here is the caller graph for this function:

◆ getDisabledButtons()

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

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

References $disabled_buttons.

Referenced by insert().

494  {
495  if (!$as_array) {
496  return implode(',', $this->disabled_buttons);
497  } else {
499  }
500  }
+ Here is the caller graph for this function:

◆ getInitialRteWidth()

ilTextAreaInputGUI::getInitialRteWidth ( )

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

References $initial_rte_width.

Referenced by insert().

502  : int
503  {
505  }
+ Here is the caller graph for this function:

◆ getInput()

ilTextAreaInputGUI::getInput ( )

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

References $value, ilFormPropertyGUI\getPostVar(), getPurifier(), getRteTagString(), getUseRte(), getUseTagsForRteOnly(), ilFormPropertyGUI\raw(), ilFormPropertyGUI\str(), ilUtil\stripSlashes(), and usePurifier().

Referenced by checkInput().

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 
308  $value = self::removeProhibitedCharacters($value);
309  return $value;
310  }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
usePurifier(?bool $a_flag=null)
Setter/Getter for the html purifier usage.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMaxNumOfChars()

ilTextAreaInputGUI::getMaxNumOfChars ( )

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

References $max_num_chars.

Referenced by checkInput(), insert(), and isCharLimited().

133  : int
134  {
135  return $this->max_num_chars;
136  }
+ Here is the caller graph for this function:

◆ getMinNumOfChars()

ilTextAreaInputGUI::getMinNumOfChars ( )

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

References $min_num_chars.

Referenced by checkInput(), insert(), and isCharLimited().

143  : int
144  {
145  return $this->min_num_chars;
146  }
+ Here is the caller graph for this function:

◆ getPurifier()

ilTextAreaInputGUI::getPurifier ( )

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

References $Purifier.

Referenced by getInput().

460  {
461  return $this->Purifier;
462  }
ilHtmlPurifierInterface $Purifier
Interface for html sanitizing functionality.
+ Here is the caller graph for this function:

◆ getRows()

ilTextAreaInputGUI::getRows ( )

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

References $rows.

Referenced by insert().

122  : int
123  {
124  return $this->rows;
125  }
+ Here is the caller graph for this function:

◆ getRTERootBlockElement()

ilTextAreaInputGUI::getRTERootBlockElement ( )

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

References $root_block_element.

Referenced by insert().

470  : ?string
471  {
473  }
+ Here is the caller graph for this function:

◆ getRteTags()

ilTextAreaInputGUI::getRteTags ( )

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

References $rtetags.

Referenced by getRteTagString(), and insert().

211  : array
212  {
213  return $this->rtetags;
214  }
+ Here is the caller graph for this function:

◆ getRteTagSet()

ilTextAreaInputGUI::getRteTagSet (   $a_set_name)

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

Referenced by insert().

225  : array
226  {
227  return $this->rte_tag_set[$a_set_name];
228  }
+ Here is the caller graph for this function:

◆ getRteTagString()

ilTextAreaInputGUI::getRteTagString ( )

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

References getRteTags().

Referenced by getInput().

230  : string
231  {
232  $result = "";
233  foreach ($this->getRteTags() as $tag) {
234  $result .= "<$tag>";
235  }
236  return $result;
237  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getUseRte()

ilTextAreaInputGUI::getUseRte ( )

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

References $usert.

Referenced by getInput(), and insert().

154  : bool
155  {
156  return $this->usert;
157  }
+ Here is the caller graph for this function:

◆ getUseTagsForRteOnly()

ilTextAreaInputGUI::getUseTagsForRteOnly ( )

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

References $use_tags_for_rte_only.

Referenced by getInput().

247  : bool
248  {
250  }
+ Here is the caller graph for this function:

◆ getValue()

ilTextAreaInputGUI::getValue ( )

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

References $value.

Referenced by insert().

98  : string
99  {
100  return $this->value;
101  }
+ Here is the caller graph for this function:

◆ insert()

ilTextAreaInputGUI::insert ( ilTemplate  $a_tpl)

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

References ilFormPropertyGUI\$lng, XapiProxy\$plugin, ilRTE\_getRTEClassname(), getCols(), ilFormPropertyGUI\getDisabled(), getDisabledButtons(), ilFormPropertyGUI\getFieldId(), ilFormPropertyGUI\getHiddenTag(), ilFormPropertyGUI\getInfo(), getInitialRteWidth(), getMaxNumOfChars(), getMinNumOfChars(), ilFormPropertyGUI\getPostVar(), ilFormPropertyGUI\getRequired(), getRows(), getRTERootBlockElement(), getRteTags(), getRteTagSet(), getUseRte(), getValue(), isCharLimited(), null, ilTemplate\parseCurrentBlock(), ilLegacyFormElementsUtil\prepareFormOutput(), ilTemplate\setCurrentBlock(), HTML_Template_IT\setVariable(), ilLanguage\toJS(), and ilLanguage\txt().

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

◆ isCharLimited()

ilTextAreaInputGUI::isCharLimited ( )

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

References getMaxNumOfChars(), and getMinNumOfChars().

Referenced by checkInput(), and insert().

512  : bool
513  {
514  if ($this->getMaxNumOfChars() || $this->getMinNumOfChars()) {
515  return true;
516  }
517 
518  return false;
519  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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()

◆ setInitialRteWidth()

ilTextAreaInputGUI::setInitialRteWidth ( int  $initial_rte_width)

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

References $initial_rte_width.

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

◆ setMaxNumOfChars()

ilTextAreaInputGUI::setMaxNumOfChars ( int  $a_number)

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

Referenced by ilBadgeManagementGUI\initBadgeForm().

128  : void
129  {
130  $this->max_num_chars = $a_number;
131  }
+ Here is the caller graph for this function:

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

References $Purifier.

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

◆ setRows()

◆ setRTERootBlockElement()

ilTextAreaInputGUI::setRTERootBlockElement ( ?string  $a_root_block_element)

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

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

◆ 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.

References $version.

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.

Referenced by setRteTagSet().

206  : void
207  {
208  $this->rtetags = $a_rtetags;
209  }
+ Here is the caller graph for this function:

◆ 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.

References setRteTags().

Referenced by __construct().

220  : void
221  {
222  $this->setRteTags($this->rte_tag_set[$a_set_name]);
223  }
+ Here is the call graph for this function:
+ 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.

References $version.

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

◆ 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()

◆ setValueByArray()

ilTextAreaInputGUI::setValueByArray ( array  $a_values)

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

References ilFormPropertyGUI\getPostVar(), ilSubEnabledFormPropertyGUI\getSubItems(), and setValue().

252  : void
253  {
254  $this->setValue($a_values[$this->getPostVar()] ?? "");
255 
256  foreach ($this->getSubItems() as $item) {
257  $item->setValueByArray($a_values);
258  }
259  }
+ Here is the call graph for this function:

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

References $usePurifier, and null.

Referenced by getInput().

441  {
442  if (null === $a_flag) {
443  return $this->usePurifier;
444  }
445 
446  $this->usePurifier = $a_flag;
447  return $this;
448  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
usePurifier(?bool $a_flag=null)
Setter/Getter for the html purifier usage.
+ Here is the caller graph for this function:

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.

Referenced by getDisabledButtons().

◆ $initial_rte_width

int ilTextAreaInputGUI::$initial_rte_width = 795
protected

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

Referenced by getInitialRteWidth(), and setInitialRteWidth().

◆ $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.

Referenced by getPurifier(), and setPurifier().

◆ $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.

Referenced by getRTERootBlockElement().

◆ $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.

Referenced by getRteTags().

◆ $use_tags_for_rte_only

bool ilTextAreaInputGUI::$use_tags_for_rte_only = true
protected

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

Referenced by getUseTagsForRteOnly().

◆ $usePurifier

bool ilTextAreaInputGUI::$usePurifier = false
protected

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

Referenced by usePurifier().

◆ $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 getInput(), and getValue().


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