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. | |
| setValue ($a_value) | |
| Set Value. | |
| getValue () | |
| Get Value. | |
| setCols ($a_cols) | |
| Set Cols. | |
| getCols () | |
| Get Cols. | |
| setRows ($a_rows) | |
| Set Rows. | |
| getRows () | |
| Get Rows. | |
| setUseRte ($a_usert) | |
| Set Use Rich Text Editing. | |
| getUseRte () | |
| Get Use Rich Text Editing. | |
| setRteTags ($a_rtetags) | |
| Set Valid RTE Tags. | |
| getRteTags () | |
| Get Valid RTE Tags. | |
| setRteTagSet ($a_set_name) | |
| Set Set of Valid RTE Tags. | |
| getRteTagSet ($a_set_name) | |
| Get Set of Valid RTE Tags. | |
| getRteTagString () | |
| RTE Tag string. | |
| setValueByArray ($a_values) | |
| Set value by array. | |
| checkInput () | |
| Check input, strip slashes etc. | |
| insert (&$a_tpl) | |
| Insert property html. | |
Protected Attributes | |
| $value | |
| $cols | |
| $rows | |
| $usert | |
| $rtetags | |
| $rte_tag_set | |
This class represents a text area property in a property form.
Definition at line 33 of file class.ilTextAreaInputGUI.php.
| ilTextAreaInputGUI::__construct | ( | $ | a_title = "", |
|
| $ | a_postvar = "" | |||
| ) |
Constructor.
| string | $a_title Title | |
| string | $a_postvar Post Variable |
Reimplemented from ilFormPropertyGUI.
Definition at line 77 of file class.ilTextAreaInputGUI.php.
References setRteTagSet(), and ilFormPropertyGUI::setType().
{
parent::__construct($a_title, $a_postvar);
$this->setType("textarea");
$this->setRteTagSet("standard");
}
Here is the call graph for this function:| ilTextAreaInputGUI::checkInput | ( | ) |
Check input, strip slashes etc.
set alert, if input is not ok.
Reimplemented from ilFormPropertyGUI.
Definition at line 235 of file class.ilTextAreaInputGUI.php.
References $lng, ilSubEnabledFormPropertyGUI::checkSubItemsInput(), ilFormPropertyGUI::getPostVar(), ilFormPropertyGUI::getRequired(), getRteTagString(), getUseRte(), ilFormPropertyGUI::setAlert(), and ilUtil::stripSlashes().
{
global $lng;
include_once("./classes/class.ilObjAdvancedEditing.php");
$_POST[$this->getPostVar()] = ($this->getUseRte())
? ilUtil::stripSlashes($_POST[$this->getPostVar()], true,
$this->getRteTagString())
: ilUtil::stripSlashes($_POST[$this->getPostVar()]);
if ($this->getRequired() && trim($_POST[$this->getPostVar()]) == "")
{
$this->setAlert($lng->txt("msg_input_is_required"));
return false;
}
return $this->checkSubItemsInput();
}
Here is the call graph for this function:| ilTextAreaInputGUI::getCols | ( | ) |
Get Cols.
Definition at line 119 of file class.ilTextAreaInputGUI.php.
Referenced by insert().
{
return $this->cols;
}
Here is the caller graph for this function:| ilTextAreaInputGUI::getRows | ( | ) |
Get Rows.
Definition at line 139 of file class.ilTextAreaInputGUI.php.
Referenced by insert().
{
return $this->rows;
}
Here is the caller graph for this function:| ilTextAreaInputGUI::getRteTags | ( | ) |
Get Valid RTE Tags.
Definition at line 179 of file class.ilTextAreaInputGUI.php.
Referenced by getRteTagString(), and insert().
{
return $this->rtetags;
}
Here is the caller graph for this function:| ilTextAreaInputGUI::getRteTagSet | ( | $ | a_set_name | ) |
Get Set of Valid RTE Tags.
Definition at line 201 of file class.ilTextAreaInputGUI.php.
{
return $this->rte_tag_set[$a_set_name];
}
| ilTextAreaInputGUI::getRteTagString | ( | ) |
RTE Tag string.
Definition at line 210 of file class.ilTextAreaInputGUI.php.
References getRteTags().
Referenced by checkInput().
{
$result = "";
foreach ($this->getRteTags() as $tag)
{
$result .= "<$tag>";
}
return $result;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilTextAreaInputGUI::getUseRte | ( | ) |
Get Use Rich Text Editing.
Definition at line 159 of file class.ilTextAreaInputGUI.php.
Referenced by checkInput(), and insert().
{
return $this->usert;
}
Here is the caller graph for this function:| ilTextAreaInputGUI::getValue | ( | ) |
Get Value.
Definition at line 99 of file class.ilTextAreaInputGUI.php.
Referenced by insert().
{
return $this->value;
}
Here is the caller graph for this function:| ilTextAreaInputGUI::insert | ( | &$ | a_tpl | ) |
Insert property html.
Definition at line 260 of file class.ilTextAreaInputGUI.php.
References ilRTE::_getRTEClassname(), getCols(), ilFormPropertyGUI::getDisabled(), ilFormPropertyGUI::getFieldId(), ilFormPropertyGUI::getPostVar(), getRows(), getRteTags(), getUseRte(), getValue(), and ilUtil::prepareFormOutput().
{
if ($this->getUseRte())
{
include_once "./Services/RTE/classes/class.ilRTE.php";
$rtestring = ilRTE::_getRTEClassname();
include_once "./Services/RTE/classes/class.$rtestring.php";
$rte = new $rtestring();
// @todo: Check this.
$rte->addPlugin("emotions");
$rte->addCustomRTESupport(0, "", $this->getRteTags());
$a_tpl->touchBlock("prop_ta_w");
$a_tpl->setCurrentBlock("prop_textarea");
$a_tpl->setVariable("ROWS", $this->getRows());
}
else
{
$a_tpl->touchBlock("no_rteditor");
$a_tpl->setCurrentBlock("prop_ta_c");
$a_tpl->setVariable("COLS", $this->getCols());
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock("prop_textarea");
$a_tpl->setVariable("ROWS", $this->getRows());
}
$a_tpl->setVariable("POST_VAR",
ilUtil::prepareFormOutput($this->getPostVar()));
$a_tpl->setVariable("ID", $this->getFieldId());
if($this->getDisabled())
{
$a_tpl->setVariable('DISABLED','disabled="disabled" ');
}
$a_tpl->setVariable("PROPERTY_VALUE", $this->getValue());
$a_tpl->parseCurrentBlock();
}
Here is the call graph for this function:| ilTextAreaInputGUI::setCols | ( | $ | a_cols | ) |
Set Cols.
| int | $a_cols Cols |
Definition at line 109 of file class.ilTextAreaInputGUI.php.
{
$this->cols = $a_cols;
}
| ilTextAreaInputGUI::setRows | ( | $ | a_rows | ) |
Set Rows.
| int | $a_rows Rows |
Definition at line 129 of file class.ilTextAreaInputGUI.php.
{
$this->rows = $a_rows;
}
| ilTextAreaInputGUI::setRteTags | ( | $ | a_rtetags | ) |
Set Valid RTE Tags.
| array | $a_rtetags Valid RTE Tags |
Definition at line 169 of file class.ilTextAreaInputGUI.php.
Referenced by setRteTagSet().
{
$this->rtetags = $a_rtetags;
}
Here is the caller graph for this function:| ilTextAreaInputGUI::setRteTagSet | ( | $ | a_set_name | ) |
Set Set of Valid RTE Tags.
Definition at line 190 of file class.ilTextAreaInputGUI.php.
References setRteTags().
Referenced by __construct().
{
$this->setRteTags($this->rte_tag_set[$a_set_name]);
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilTextAreaInputGUI::setUseRte | ( | $ | a_usert | ) |
Set Use Rich Text Editing.
| int | $a_usert Use Rich Text Editing |
Definition at line 149 of file class.ilTextAreaInputGUI.php.
{
$this->usert = $a_usert;
}
| ilTextAreaInputGUI::setValue | ( | $ | a_value | ) |
Set Value.
| string | $a_value Value |
Definition at line 89 of file class.ilTextAreaInputGUI.php.
Referenced by setValueByArray().
{
$this->value = $a_value;
}
Here is the caller graph for this function:| ilTextAreaInputGUI::setValueByArray | ( | $ | a_values | ) |
Set value by array.
| array | $a_values value array |
Definition at line 225 of file class.ilTextAreaInputGUI.php.
References ilFormPropertyGUI::getPostVar(), and setValue().
{
$this->setValue($a_values[$this->getPostVar()]);
}
Here is the call graph for this function:ilTextAreaInputGUI::$cols [protected] |
Definition at line 36 of file class.ilTextAreaInputGUI.php.
ilTextAreaInputGUI::$rows [protected] |
Definition at line 37 of file class.ilTextAreaInputGUI.php.
ilTextAreaInputGUI::$rte_tag_set [protected] |
array(
"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 41 of file class.ilTextAreaInputGUI.php.
ilTextAreaInputGUI::$rtetags [protected] |
Definition at line 39 of file class.ilTextAreaInputGUI.php.
ilTextAreaInputGUI::$usert [protected] |
Definition at line 38 of file class.ilTextAreaInputGUI.php.
ilTextAreaInputGUI::$value [protected] |
Definition at line 35 of file class.ilTextAreaInputGUI.php.
1.7.1