本文整理汇总了PHP中PHPWS_Text::decodeText方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPWS_Text::decodeText方法的具体用法?PHP PHPWS_Text::decodeText怎么用?PHP PHPWS_Text::decodeText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPWS_Text
的用法示例。
在下文中一共展示了PHPWS_Text::decodeText方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getContent
public function getContent($view_mode = true, $fix_anchor = true)
{
if (empty($this->content)) {
return null;
}
if ($view_mode) {
return PHPWS_Text::parseTag(PHPWS_Text::parseOutput($this->content, ENCODE_PARSED_TEXT, false, false, $fix_anchor));
} else {
return PHPWS_Text::decodeText($this->content);
}
}
示例2: get
public function get()
{
$breaker = null;
if ($this->use_editor) {
$text = PHPWS_Text::decodeText($this->value);
return javascript('ckeditor', array('ID' => $this->id, 'NAME' => $this->name, 'VALUE' => $text));
}
$value = preg_replace('/<br\\s?\\/?>(\\r\\n)?/', "\n", $this->value);
if (ord(substr($value, 0, 1)) == 13) {
$value = "\n" . $value;
}
if (isset($this->width)) {
$style[] = 'width : ' . $this->width;
} else {
$dimensions[] = $this->getCols(true);
}
if (isset($this->height)) {
$style[] = 'height : ' . $this->height;
} else {
$dimensions[] = $this->getRows(true);
}
if (isset($style)) {
$dimensions[] = 'style="' . implode('; ', $style) . '"';
}
if (!USE_BREAKER && !empty($this->_form->use_breaker)) {
$check_name = sprintf('%s_breaker', $this->name);
$checkbox = new Form_Checkbox($check_name);
$checkbox->_form = $this->_form;
$checkbox->setLabel(_('Break newlines'));
$checkbox->setId($check_name);
$breaker = sprintf('<div class="textarea-breaker">%s %s</div>', $checkbox->get(), $checkbox->getLabel(true, true));
}
return $breaker . '<textarea ' . $this->getName(true) . $this->getTitle(true) . $this->getPlaceholder() . $this->getDisabled() . $this->getReadOnly() . implode(' ', $dimensions) . ' ' . $this->getData() . sprintf('>%s</textarea>', $value);
}