本文整理匯總了PHP中FabrikHelperHTML::getEditorArea方法的典型用法代碼示例。如果您正苦於以下問題:PHP FabrikHelperHTML::getEditorArea方法的具體用法?PHP FabrikHelperHTML::getEditorArea怎麽用?PHP FabrikHelperHTML::getEditorArea使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FabrikHelperHTML
的用法示例。
在下文中一共展示了FabrikHelperHTML::getEditorArea方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
echo $this->subject;
?>
" size="20" />
</label>
</li>
<?php
}
?>
<li>
<label>
<?php
echo JText::_('MESSAGE');
?>
<br />
<?php
echo FabrikHelperHTML::getEditorArea('message', $this->message, 'message', 75, 10, 75, 10);
?>
</label>
</li>
<?php
if ($this->allowAttachment) {
?>
<li class="attachement">
<label>
<?php
echo JText::_('ATTACHMENT');
?>
<br />
<input class="inputbox fabrikinput" name="attachement[]" type="file" id="attachement" />
</label>
<a href="#" class="addattachement">
示例2: render
/**
* draws the form element
* @param int repeat group counter
* @return string returns element html
*/
function render($data, $repeatCounter = 0)
{
$name = $this->getHTMLName($repeatCounter);
$id = $this->getHTMLId($repeatCounter);
$element =& $this->getElement();
if ($element->hidden == '1') {
return $this->getHiddenField($name, $data[$name], $id);
}
$params =& $this->getParams();
$cols = $element->width;
$rows = $element->height;
$value = $this->getValue($data, $repeatCounter);
$bits = array();
if (!$this->_editable) {
if ($params->get('use_wysiwyg', 0) == 0) {
$value = nl2br($value);
}
if ($params->get('textarea-tagify') == true) {
$value = $this->tagify($value);
}
$value = $this->_replaceWithIcons($value);
return $value;
}
$bits['class'] = "fabrikinput inputbox";
if (isset($this->_elementError) && $this->_elementError != '') {
$bits['class'] .= " elementErrorHighlight";
}
if ($params->get('use_wysiwyg')) {
$str = FabrikHelperHTML::getEditorArea($name, $value, $name, $cols, $rows, $cols, $rows);
} else {
if ($params->get('disable')) {
$bits['class'] .= " disabled";
$bits['disabled'] = 'disabled';
}
$str = "<textarea ";
foreach ($bits as $key => $val) {
$str .= "{$key}=\"{$val}\" ";
}
$str .= "name=\"{$name}\" id=\"" . $id . "\" cols=\"{$cols}\" rows=\"{$rows}\">" . $value . "</textarea>\n";
}
if ($params->get('textarea-showmax')) {
$charsLeft = $params->get('textarea-maxlength') - strlen($value);
$str .= "<div class=\"fabrik_characters_left\"><span>" . $charsLeft . "</span> " . JText::_('Characters left') . "</div>";
}
return $str;
}