ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 ($a_title="", $a_postvar="")
 Constructor. More...
 
 setValue ($a_value)
 Set Value. More...
 
 getValue ()
 Get Value. More...
 
 setCols ($a_cols)
 Set Cols. More...
 
 getCols ()
 Get Cols. More...
 
 setRows ($a_rows)
 Set Rows. More...
 
 getRows ()
 Get Rows. More...
 
 setUseRte ($a_usert, $version='')
 Set Use Rich Text Editing. More...
 
 getUseRte ()
 Get Use Rich Text Editing. More...
 
 addPlugin ($a_plugin)
 Add RTE plugin. More...
 
 removePlugin ($a_plugin)
 Remove RTE plugin. More...
 
 addButton ($a_button)
 Add RTE button. More...
 
 removeButton ($a_button)
 Remove RTE button. More...
 
 setRTESupport ($obj_id, $obj_type, $module, $cfg_template=null, $hide_switch=false, $version=null)
 Set RTE support for a special module. More...
 
 removeRTESupport ()
 Remove RTE support for a special module. More...
 
 setRteTags ($a_rtetags)
 Set Valid RTE Tags. More...
 
 getRteTags ()
 Get Valid RTE Tags. More...
 
 setRteTagSet ($a_set_name)
 Set Set of Valid RTE Tags. More...
 
 getRteTagSet ($a_set_name)
 Get Set of Valid RTE Tags. More...
 
 getRteTagString ()
 RTE Tag string. More...
 
 setUseTagsForRteOnly ($a_val)
 Set use tags for RTE only (default is true) More...
 
 getUseTagsForRteOnly ()
 Get use tags for RTE only (default is true) More...
 
 setValueByArray ($a_values)
 Set value by array. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 insert ($a_tpl)
 Insert property html. More...
 
 usePurifier ($a_flag=null)
 Setter/Getter for the html purifier usage. More...
 
 setPurifier (ilHtmlPurifierInterface $Purifier)
 Setter for the html purifier. More...
 
 getPurifier ()
 Getter for the html purifier. More...
 
 setRTERootBlockElement ($a_root_block_element)
 Setter for the TinyMCE root block element. More...
 
 getRTERootBlockElement ()
 Getter for the TinyMCE root block element. More...
 
 disableButtons ($a_button)
 Sets buttons which should be disabled in TinyMCE. More...
 
 getDisabledButtons ($as_array=true)
 Returns the disabled TinyMCE buttons. More...
 
 getInitialRteWidth ()
 
 setInitialRteWidth ($initial_rte_width)
 
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem ($a_item)
 Add Subitem. More...
 
 getSubItems ()
 Get Subitems. More...
 
 getSubInputItemsRecursive ()
 returns a flat array of possibly existing subitems recursively More...
 
 checkSubItemsInput ()
 Check SubItems. More...
 
 getSubForm ()
 Get sub form html. More...
 
 getItemByPostVar ($a_post_var)
 Get item by post var. More...
 
- Public Member Functions inherited from ilFormPropertyGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 getType ()
 Get Type. More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setPostVar ($a_postvar)
 Set Post Variable. More...
 
 getPostVar ()
 Get Post Variable. More...
 
 getFieldId ()
 Get Post Variable. More...
 
 setInfo ($a_info)
 Set Information Text. More...
 
 getInfo ()
 Get Information Text. More...
 
 setAlert ($a_alert)
 Set Alert Text. More...
 
 getAlert ()
 Get Alert Text. More...
 
 setRequired ($a_required)
 Set Required. More...
 
 getRequired ()
 Get Required. More...
 
 setDisabled ($a_disabled)
 Set Disabled. More...
 
 getDisabled ()
 Get Disabled. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 setParentForm ($a_parentform)
 Set Parent Form. More...
 
 getParentForm ()
 Get Parent Form. More...
 
 setParent ($a_val)
 Set Parent GUI object. More...
 
 getParent ()
 Get Parent GUI object. More...
 
 getSubForm ()
 Get sub form html. More...
 
 hideSubForm ()
 Sub form hidden on init? More...
 
 setHiddenTitle ($a_val)
 Set hidden title (for screenreaders) More...
 
 getHiddenTitle ()
 Get hidden title. More...
 
 getItemByPostVar ($a_post_var)
 Get item by post var. More...
 
 serializeData ()
 serialize data More...
 
 unserializeData ($a_data)
 unserialize data More...
 
 writeToSession ()
 Write to session. More...
 
 clearFromSession ()
 Clear session value. More...
 
 readFromSession ()
 Read from session. More...
 
 getHiddenTag ($a_post_var, $a_value)
 Get hidden tag (used for disabled properties) More...
 
 setMulti ($a_multi, $a_sortable=false, $a_addremove=true)
 Set Multi. More...
 
 getMulti ()
 Get Multi. More...
 
 setMultiValues (array $a_values)
 Set multi values. More...
 
 getMultiValues ()
 Get multi values. More...
 
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g. More...
 
 stripSlashesAddSpaceFallback ($a_str)
 Strip slashes with add space fallback, see https://www.ilias.de/mantis/view.php?id=19727. More...
 

Protected Attributes

 $value
 
 $cols
 
 $rows
 
 $usert
 
 $rtetags
 
 $plugins
 
 $removeplugins
 
 $buttons
 
 $rtesupport
 
 $use_tags_for_rte_only = true
 
 $initial_rte_width = 795
 
 $disabled_buttons = array()
 
 $usePurifier = false
 
 $Purifier = null
 
 $root_block_element = null
 
 $rte_tag_set
 
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
 $sub_items = array()
 
- Protected Attributes inherited from ilFormPropertyGUI
 $type
 
 $title
 
 $postvar
 
 $info
 
 $alert
 
 $required = false
 
 $parentgui
 
 $parentform
 
 $hidden_title = ""
 
 $multi = false
 
 $multi_sortable = false
 
 $multi_addremove = true
 
 $multi_values
 

Additional Inherited Members

- Static Public Member Functions inherited from ilFormPropertyGUI
static removeProhibitedCharacters ($a_text)
 Remove prohibited characters see #19159. More...
 
- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type. More...
 
 getMultiIconsHTML ()
 Get HTML for multiple value icons. More...
 

Detailed Description

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

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost Variable

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

References array, setRteTagSet(), and ilFormPropertyGUI\setType().

129  {
130  parent::__construct($a_title, $a_postvar);
131  $this->setType("textarea");
132  $this->setRteTagSet("standard");
133  $this->plugins = array();
134  $this->removeplugins = array();
135  $this->buttons = array();
136  $this->rteSupport = array();
137  }
setRteTagSet($a_set_name)
Set Set of Valid RTE Tags.
setType($a_type)
Set Type.
Create styles array
The data for the language used.
+ Here is the call graph for this function:

Member Function Documentation

◆ addButton()

ilTextAreaInputGUI::addButton (   $a_button)

Add RTE button.

Parameters
string$a_buttonButton name

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

253  {
254  $this->buttons[$a_button] = $a_button;
255  }

◆ addPlugin()

ilTextAreaInputGUI::addPlugin (   $a_plugin)

Add RTE plugin.

Parameters
string$a_pluginPlugin name

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

233  {
234  $this->plugins[$a_plugin] = $a_plugin;
235  }

◆ checkInput()

ilTextAreaInputGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Returns
boolean Input ok, true/false

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

References $_POST, $lng, ilSubEnabledFormPropertyGUI\checkSubItemsInput(), ilFormPropertyGUI\getPostVar(), getPurifier(), ilFormPropertyGUI\getRequired(), getRteTagString(), getUseRte(), getUseTagsForRteOnly(), ilFormPropertyGUI\setAlert(), ilUtil\stripOnlySlashes(), ilUtil\stripSlashes(), ilFormPropertyGUI\stripSlashesAddSpaceFallback(), and usePurifier().

384  {
385  global $lng;
386  include_once("./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php");
387 
388  if($this->usePurifier() && $this->getPurifier())
389  {
391  $_POST[$this->getPostVar()] = $this->getPurifier()->purify($_POST[$this->getPostVar()]);
392  }
393  else
394  {
395  $allowed = $this->getRteTagString();
396  if ($this->plugins["latex"] == "latex" && !is_int(strpos($allowed, "<span>")))
397  {
398  $allowed.= "<span>";
399  }
400  $_POST[$this->getPostVar()] = ($this->getUseRte() || !$this->getUseTagsForRteOnly())
401  ? ilUtil::stripSlashes($_POST[$this->getPostVar()], true, $allowed)
402  : $this->stripSlashesAddSpaceFallback($_POST[$this->getPostVar()]);
403  }
404 
405  $_POST[$this->getPostVar()] = self::removeProhibitedCharacters($_POST[$this->getPostVar()]);
406 
407  if ($this->getRequired() && trim($_POST[$this->getPostVar()]) == "")
408  {
409  $this->setAlert($lng->txt("msg_input_is_required"));
410 
411  return false;
412  }
413  return $this->checkSubItemsInput();
414  }
getPostVar()
Get Post Variable.
setAlert($a_alert)
Set Alert Text.
static stripOnlySlashes($a_str)
strip slashes if magic qoutes is enabled
getRteTagString()
RTE Tag string.
getUseRte()
Get Use Rich Text Editing.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
usePurifier($a_flag=null)
Setter/Getter for the html purifier usage.
stripSlashesAddSpaceFallback($a_str)
Strip slashes with add space fallback, see https://www.ilias.de/mantis/view.php?id=19727.
global $lng
Definition: privfeed.php:17
getUseTagsForRteOnly()
Get use tags for RTE only (default is true)
$_POST["username"]
getPurifier()
Getter for the html purifier.
+ Here is the call graph for this function:

◆ disableButtons()

ilTextAreaInputGUI::disableButtons (   $a_button)

Sets buttons which should be disabled in TinyMCE.

Parameters
mixed$a_buttonEither a button string or an array of button strings
Returns
ilTextAreaInputGUI Instance of ilTextAreaInputGUI public

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

References array.

625  {
626  if(is_array($a_button))
627  {
628  $this->disabled_buttons = array_unique(array_merge($this->disabled_buttons, $a_button));
629  }
630  else
631  {
632  $this->disabled_buttons = array_unique(array_merge($this->disabled_buttons, array($a_button)));
633  }
634 
635  return $this;
636  }
Create styles array
The data for the language used.

◆ getCols()

ilTextAreaInputGUI::getCols ( )

Get Cols.

Returns
int Cols

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

References $cols.

Referenced by insert().

177  {
178  return $this->cols;
179  }
+ Here is the caller graph for this function:

◆ getDisabledButtons()

ilTextAreaInputGUI::getDisabledButtons (   $as_array = true)

Returns the disabled TinyMCE buttons.

Parameters
boolean$as_arrayShould the disabled buttons be returned as a string or as an array
Returns
Array Array of disabled buttons public

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

References $disabled_buttons.

Referenced by insert().

647  {
648  if(!$as_array)
649  {
650  return implode(',', $this->disabled_buttons);
651  }
652  else
653  {
655  }
656  }
+ Here is the caller graph for this function:

◆ getInitialRteWidth()

ilTextAreaInputGUI::getInitialRteWidth ( )
Returns
int

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

References $initial_rte_width.

Referenced by insert().

662  {
664  }
+ Here is the caller graph for this function:

◆ getPurifier()

ilTextAreaInputGUI::getPurifier ( )

Getter for the html purifier.

Returns
ilHtmlPurifierInterface Instance of ilHtmlPurifierInterface public

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

References $Purifier.

Referenced by checkInput().

588  {
589  return $this->Purifier;
590  }
+ Here is the caller graph for this function:

◆ getRows()

ilTextAreaInputGUI::getRows ( )

Get Rows.

Returns
int Rows

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

References $rows.

Referenced by insert().

197  {
198  return $this->rows;
199  }
+ Here is the caller graph for this function:

◆ getRTERootBlockElement()

ilTextAreaInputGUI::getRTERootBlockElement ( )

Getter for the TinyMCE root block element.

Returns
string Root block element of TinyMCE public

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

References $root_block_element.

Referenced by insert().

612  {
614  }
+ Here is the caller graph for this function:

◆ getRteTags()

ilTextAreaInputGUI::getRteTags ( )

Get Valid RTE Tags.

Returns
array Valid RTE Tags

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

References $rtetags.

Referenced by getRteTagString(), and insert().

303  {
304  return $this->rtetags;
305  }
+ Here is the caller graph for this function:

◆ getRteTagSet()

ilTextAreaInputGUI::getRteTagSet (   $a_set_name)

Get Set of Valid RTE Tags.

Returns
array Set name "standard", "extended", "extended_img", "extended_table", "extended_table_img", "full"

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

Referenced by insert().

325  {
326  return $this->rte_tag_set[$a_set_name];
327  }
+ Here is the caller graph for this function:

◆ getRteTagString()

ilTextAreaInputGUI::getRteTagString ( )

RTE Tag string.

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

References $result, and getRteTags().

Referenced by checkInput().

334  {
335  $result = "";
336  foreach ($this->getRteTags() as $tag)
337  {
338  $result .= "<$tag>";
339  }
340  return $result;
341  }
$result
getRteTags()
Get Valid RTE Tags.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getUseRte()

ilTextAreaInputGUI::getUseRte ( )

Get Use Rich Text Editing.

Returns
int Use Rich Text Editing

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

References $usert.

Referenced by checkInput(), and insert().

223  {
224  return $this->usert;
225  }
+ Here is the caller graph for this function:

◆ getUseTagsForRteOnly()

ilTextAreaInputGUI::getUseTagsForRteOnly ( )

Get use tags for RTE only (default is true)

Returns
boolean use tags for RTE only

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

References $use_tags_for_rte_only.

Referenced by checkInput().

+ Here is the caller graph for this function:

◆ getValue()

ilTextAreaInputGUI::getValue ( )

Get Value.

Returns
string Value

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

References $value.

Referenced by insert().

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

◆ insert()

ilTextAreaInputGUI::insert (   $a_tpl)

Insert property html.

Returns
int Size

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

References ilRTE\_getRTEClassname(), array, getCols(), ilFormPropertyGUI\getDisabled(), getDisabledButtons(), ilFormPropertyGUI\getFieldId(), ilFormPropertyGUI\getHiddenTag(), getInitialRteWidth(), ilFormPropertyGUI\getPostVar(), ilFormPropertyGUI\getRequired(), getRows(), getRTERootBlockElement(), getRteTags(), getRteTagSet(), getUseRte(), getValue(), and ilUtil\prepareFormOutput().

422  {
423  $ttpl = new ilTemplate("tpl.prop_textarea.html", true, true, "Services/Form");
424 
425  // disabled rte
426  if ($this->getUseRte() && $this->getDisabled())
427  {
428  $ttpl->setCurrentBlock("disabled_rte");
429  $ttpl->setVariable("DR_VAL", $this->getValue());
430  $ttpl->parseCurrentBlock();
431  }
432  else
433  {
434  if ($this->getUseRte())
435  {
436  $rtestring = ilRTE::_getRTEClassname();
437  include_once "./Services/RTE/classes/class.$rtestring.php";
438  $rte = new $rtestring($this->rteSupport['version']);
439 
440  $rte->setInitialWidth($this->getInitialRteWidth());
441 
442  // @todo: Check this.
443  $rte->addPlugin("emotions");
444  foreach ($this->plugins as $plugin)
445  {
446  if (strlen($plugin))
447  {
448  $rte->addPlugin($plugin);
449  }
450  }
451  foreach ($this->removeplugins as $plugin)
452  {
453  if (strlen($plugin))
454  {
455  $rte->removePlugin($plugin);
456  }
457  }
458 
459  foreach ($this->buttons as $button)
460  {
461  if (strlen($button))
462  {
463  $rte->addButton($button);
464  }
465  }
466 
467  $rte->disableButtons($this->getDisabledButtons());
468 
469  if($this->getRTERootBlockElement() !== null)
470  {
471  $rte->setRTERootBlockElement($this->getRTERootBlockElement());
472  }
473 
474  if (count($this->rteSupport) >= 3)
475  {
476  $rte->addRTESupport($this->rteSupport["obj_id"], $this->rteSupport["obj_type"], $this->rteSupport["module"], false, $this->rteSupport['cfg_template'], $this->rteSupport['hide_switch']);
477  }
478  else
479  {
480  // disable all plugins for mini-tagset
481  if(!array_diff($this->getRteTags(), $this->getRteTagSet("mini")))
482  {
483  $rte->removeAllPlugins();
484 
485  // #13603 - "paste from word" is essential
486  $rte->addPlugin("paste");
487 
488  // #11980 - p-tag is mandatory but we do not want the icons it comes with
489  $rte->disableButtons(array("anchor", "justifyleft", "justifycenter",
490  "justifyright", "justifyfull", "formatselect", "removeformat",
491  "cut", "copy", "paste", "pastetext")); // JF, 2013-12-09
492  }
493 
494  $rte->addCustomRTESupport(0, "", $this->getRteTags());
495  }
496 
497  $ttpl->touchBlock("prop_ta_w");
498  $ttpl->setCurrentBlock("prop_textarea");
499  $ttpl->setVariable("ROWS", $this->getRows());
500  }
501  else
502  {
503  $ttpl->touchBlock("no_rteditor");
504 
505  if ($this->getCols() > 5)
506  {
507  $ttpl->setCurrentBlock("prop_ta_c");
508  $ttpl->setVariable("COLS", $this->getCols());
509  $ttpl->parseCurrentBlock();
510  }
511  else
512  {
513  $ttpl->touchBlock("prop_ta_w");
514  }
515 
516  $ttpl->setCurrentBlock("prop_textarea");
517  $ttpl->setVariable("ROWS", $this->getRows());
518  }
519  if (!$this->getDisabled())
520  {
521  $ttpl->setVariable("POST_VAR",
522  $this->getPostVar());
523  }
524  $ttpl->setVariable("ID", $this->getFieldId());
525  if ($this->getDisabled())
526  {
527  $ttpl->setVariable('DISABLED','disabled="disabled" ');
528  }
529  $ttpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($this->getValue()));
530 
531  if($this->getRequired())
532  {
533  $ttpl->setVariable("REQUIRED", "required=\"required\"");
534  }
535 
536  $ttpl->parseCurrentBlock();
537  }
538 
539  if ($this->getDisabled())
540  {
541  $ttpl->setVariable("HIDDEN_INPUT",
542  $this->getHiddenTag($this->getPostVar(), $this->getValue()));
543  }
544  $a_tpl->setCurrentBlock("prop_generic");
545  $a_tpl->setVariable("PROP_GENERIC", $ttpl->get());
546  $a_tpl->parseCurrentBlock();
547 
548  }
static _getRTEClassname()
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
getHiddenTag($a_post_var, $a_value)
Get hidden tag (used for disabled properties)
getPostVar()
Get Post Variable.
getRteTags()
Get Valid RTE Tags.
getRTERootBlockElement()
Getter for the TinyMCE root block element.
getRteTagSet($a_set_name)
Get Set of Valid RTE Tags.
getFieldId()
Get Post Variable.
special template class to simplify handling of ITX/PEAR
getUseRte()
Get Use Rich Text Editing.
Create styles array
The data for the language used.
getDisabledButtons($as_array=true)
Returns the disabled TinyMCE buttons.
+ Here is the call graph for this function:

◆ removeButton()

ilTextAreaInputGUI::removeButton (   $a_button)

Remove RTE button.

Parameters
string$a_buttonButton name

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

263  {
264  unset($this->buttons[$a_button]);
265  }

◆ removePlugin()

ilTextAreaInputGUI::removePlugin (   $a_plugin)

Remove RTE plugin.

Parameters
string$a_pluginPlugin name

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

243  {
244  $this->removeplugins[$a_plugin] = $a_plugin;
245  }

◆ removeRTESupport()

ilTextAreaInputGUI::removeRTESupport ( )

Remove RTE support for a special module.

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

References array.

283  {
284  $this->rteSupport = array();
285  }
Create styles array
The data for the language used.

◆ setCols()

◆ setInitialRteWidth()

ilTextAreaInputGUI::setInitialRteWidth (   $initial_rte_width)
Parameters
int$initial_rte_width

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

References $initial_rte_width.

670  {
671  $this->initial_rte_width = $initial_rte_width;
672  }

◆ setPurifier()

ilTextAreaInputGUI::setPurifier ( ilHtmlPurifierInterface  $Purifier)

Setter for the html purifier.

Parameters
ilHtmlPurifierInterfaceInstance of ilHtmlPurifierInterface
Returns
ilTextAreaInputGUI Instance of ilTextAreaInputGUI public

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

References $Purifier.

576  {
577  $this->Purifier = $Purifier;
578  return $this;
579  }

◆ setRows()

◆ setRTERootBlockElement()

ilTextAreaInputGUI::setRTERootBlockElement (   $a_root_block_element)

Setter for the TinyMCE root block element.

Parameters
string$a_root_block_elementroot block element
Returns
ilTextAreaInputGUI Instance of ilTextAreaInputGUI public

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

600  {
601  $this->root_block_element = $a_root_block_element;
602  return $this;
603  }

◆ setRTESupport()

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

Set RTE support for a special module.

Parameters
int$obj_idObject ID
string$obj_typeObject Type
string$moduleILIAS module

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

References $version, and array.

275  {
276  $this->rteSupport = array("obj_id" => $obj_id, "obj_type" => $obj_type, "module" => $module, 'cfg_template' => $cfg_template, 'hide_switch' => $hide_switch, 'version' => $version);
277  }
Create styles array
The data for the language used.

◆ setRteTags()

ilTextAreaInputGUI::setRteTags (   $a_rtetags)

Set Valid RTE Tags.

Parameters
array$a_rtetagsValid RTE Tags

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

Referenced by setRteTagSet().

293  {
294  $this->rtetags = $a_rtetags;
295  }
+ Here is the caller graph for this function:

◆ setRteTagSet()

ilTextAreaInputGUI::setRteTagSet (   $a_set_name)

Set Set of Valid RTE Tags.

Returns
array Set name "standard", "extended", "extended_img", "extended_table", "extended_table_img", "full"

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

References setRteTags().

Referenced by __construct().

314  {
315  $this->setRteTags($this->rte_tag_set[$a_set_name]);
316  }
setRteTags($a_rtetags)
Set Valid RTE Tags.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setUseRte()

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

Set Use Rich Text Editing.

Parameters
int$a_usertUse Rich Text Editing
string$version

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

References $version.

Referenced by ilDclTableEditGUI\initForm().

208  {
209  $this->usert = $a_usert;
210 
211  if(strlen($version))
212  {
213  $this->rteSupport['version'] = $version;
214  }
215  }
+ Here is the caller graph for this function:

◆ setUseTagsForRteOnly()

ilTextAreaInputGUI::setUseTagsForRteOnly (   $a_val)

Set use tags for RTE only (default is true)

Parameters
boolean$a_valuse tags for RTE only

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

349  {
350  $this->use_tags_for_rte_only = $a_val;
351  }

◆ setValue()

ilTextAreaInputGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

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

Referenced by ilCourseContentGUI\__showUserAcceptanceTable(), assClozeTestGUI\addBasicQuestionFormProperties(), assQuestionGUI\addBasicQuestionFormProperties(), ilUserProfile\addStandardFieldsToForm(), ilAdvancedMDFieldDefinition\addToFieldDefinitionForm(), ilOrgUnitTypeFormGUI\addTranslationInputs(), ilStudyProgrammeTypeFormGUI\addTranslationInputs(), ilTestScoringGUI\buildManScoringParticipantForm(), ilGroupRegistrationGUI\fillRegistrationType(), ilCourseRegistrationGUI\fillRegistrationType(), ilMailFormGUI\getTemplateDataById(), ilSurveyParticipantsGUI\importExternalMailRecipientsFromTextFormObject(), ilPageLayoutAdministrationGUI\initAddPageLayoutForm(), ilObjMDSettingsGUI\initCopyrightEditForm(), ilObjFileAccessSettingsGUI\initDownloadingSettingsForm(), ilObjSurveyQuestionPoolGUI\initEditForm(), ilRemoteObjectBaseGUI\initEditForm(), ilObjCourseGUI\initEditForm(), ilDidacticTemplateSettingsGUI\initEditTemplate(), ilPageLayoutGUI\initForm(), ilCalendarAppointmentGUI\initForm(), ilAdvancedMDSettingsGUI\initForm(), ilObjGroupGUI\initForm(), ilObjSessionGUI\initForm(), ilObjRoleTemplateGUI\initFormRoleTemplate(), ilObjLinkResourceGUI\initFormSettings(), ilCourseObjectivesGUI\initFormTitle(), ilObjCourseGUI\initInfoEditor(), ilObjUserFolderGUI\initNewAccountMailForm(), ilObjSCORM2004LearningModuleGUI\initPropertiesForm(), ilObjSurveyGUI\initPropertiesForm(), ilObjTaxonomyGUI\initSettingsForm(), ilObjMediaCastGUI\initSettingsForm(), ilChatroomAdminSmileyGUI\initSmiliesEditForm(), assErrorTextGUI\populateQuestionSpecificFormPart(), assOrderingHorizontalGUI\populateQuestionSpecificFormPart(), ilObjSCORMLearningModuleGUI\properties(), ilObjOrgUnitSettingsFormGUI\saveObject(), setValueByArray(), and assQuestionGUI\suggestedsolution().

145  {
146  $this->value = $a_value;
147  }
+ Here is the caller graph for this function:

◆ setValueByArray()

ilTextAreaInputGUI::setValueByArray (   $a_values)

Set value by array.

Parameters
array$a_valuesvalue array

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

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

369  {
370  $this->setValue($a_values[$this->getPostVar()]);
371 
372  foreach($this->getSubItems() as $item)
373  {
374  $item->setValueByArray($a_values);
375  }
376  }
getPostVar()
Get Post Variable.
setValue($a_value)
Set Value.
+ Here is the call graph for this function:

◆ usePurifier()

ilTextAreaInputGUI::usePurifier (   $a_flag = null)

Setter/Getter for the html purifier usage.

Parameters
boolean$a_flagUse purifier or not
Returns
mixed Returns instance of ilTextAreaInputGUI or boolean public

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

References $usePurifier.

Referenced by checkInput().

558  {
559  if(null === $a_flag)
560  {
561  return $this->usePurifier;
562  }
563 
564  $this->usePurifier = $a_flag;
565  return $this;
566  }
usePurifier($a_flag=null)
Setter/Getter for the html purifier usage.
+ Here is the caller graph for this function:

Field Documentation

◆ $buttons

ilTextAreaInputGUI::$buttons
protected

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

◆ $cols

ilTextAreaInputGUI::$cols
protected

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

Referenced by getCols().

◆ $disabled_buttons

ilTextAreaInputGUI::$disabled_buttons = array()
protected

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

Referenced by getDisabledButtons().

◆ $initial_rte_width

ilTextAreaInputGUI::$initial_rte_width = 795
protected

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

Referenced by getInitialRteWidth(), and setInitialRteWidth().

◆ $plugins

ilTextAreaInputGUI::$plugins
protected

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

◆ $Purifier

ilTextAreaInputGUI::$Purifier = null
protected

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

Referenced by getPurifier(), and setPurifier().

◆ $removeplugins

ilTextAreaInputGUI::$removeplugins
protected

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

◆ $root_block_element

ilTextAreaInputGUI::$root_block_element = null
protected

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

Referenced by getRTERootBlockElement().

◆ $rows

ilTextAreaInputGUI::$rows
protected

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

Referenced by getRows().

◆ $rte_tag_set

ilTextAreaInputGUI::$rte_tag_set
protected
Initial value:
"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 91 of file class.ilTextAreaInputGUI.php.

◆ $rtesupport

ilTextAreaInputGUI::$rtesupport
protected

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

◆ $rtetags

ilTextAreaInputGUI::$rtetags
protected

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

Referenced by getRteTags().

◆ $use_tags_for_rte_only

ilTextAreaInputGUI::$use_tags_for_rte_only = true
protected

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

Referenced by getUseTagsForRteOnly().

◆ $usePurifier

ilTextAreaInputGUI::$usePurifier = false
protected

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

Referenced by usePurifier().

◆ $usert

ilTextAreaInputGUI::$usert
protected

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

Referenced by getUseRte().

◆ $value

ilTextAreaInputGUI::$value
protected

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

Referenced by getValue().


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