本文整理汇总了PHP中StringUtils::StringLength方法的典型用法代码示例。如果您正苦于以下问题:PHP StringUtils::StringLength方法的具体用法?PHP StringUtils::StringLength怎么用?PHP StringUtils::StringLength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringUtils
的用法示例。
在下文中一共展示了StringUtils::StringLength方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: RenderTextViewColumn
/**
* @param TextViewColumn $column
*/
public function RenderTextViewColumn($column)
{
$value = $column->GetValue();
$dataset = $column->GetDataset();
$column->BeforeColumnRender->Fire(array(&$value, &$dataset));
if (!isset($value)) {
$this->result = $this->GetNullValuePresentation($column);
} else {
if ($column->GetEscapeHTMLSpecialChars()) {
$value = htmlspecialchars($value);
}
$columnMaxLength = $column->GetMaxLength();
if ($this->HttpHandlersAvailable() && $this->ChildPagesAvailable() && isset($columnMaxLength) && isset($value) && StringUtils::StringLength($value, $column->GetGrid()->GetPage()->GetContentEncoding()) > $columnMaxLength) {
$originalValue = $value;
if ($this->HtmlMarkupAvailable() && $column->GetReplaceLFByBR()) {
$originalValue = str_replace("\n", "<br/>", $originalValue);
}
$value = StringUtils::SubString($value, 0, $columnMaxLength, $column->GetGrid()->GetPage()->GetContentEncoding());
$value .= '... <span class="more_hint"><a href="' . $column->GetMoreLink() . '" ' . 'onClick="javascript: pwin = window.open(\'\',null,\'height=300,width=400,status=yes,resizable=yes,toolbar=no,menubar=no,location=no,left=150,top=200,scrollbars=yes\'); pwin.location=\'' . $column->GetMoreLink() . '\'; return false;">' . $this->captions->GetMessageString('more') . '</a>';
$value .= '<div class="box_hidden">' . $originalValue . '</div></span>';
}
if ($this->HtmlMarkupAvailable() && $column->GetReplaceLFByBR()) {
$value = str_replace("\n", "<br/>", $value);
}
$this->result = $value;
}
}
示例2: RenderTextViewColumn
/**
* @param TextViewColumn $column
*/
public function RenderTextViewColumn($column)
{
$value = $column->GetValue();
$dataset = $column->GetDataset();
$column->BeforeColumnRender->Fire(array(&$value, &$dataset));
if (!isset($value)) {
$this->result = $this->GetNullValuePresentation($column);
} else {
if ($column->GetEscapeHTMLSpecialChars()) {
$value = htmlspecialchars($value);
}
$columnMaxLength = $column->GetMaxLength();
if ($this->handleLongValuedTextFields() && $this->HttpHandlersAvailable() && $this->ChildPagesAvailable() && isset($columnMaxLength) && isset($value) && StringUtils::StringLength($value, $column->GetGrid()->GetPage()->GetContentEncoding()) > $columnMaxLength) {
$originalValue = $value;
if ($this->HtmlMarkupAvailable() && $column->GetReplaceLFByBR()) {
$originalValue = str_replace("\n", "<br/>", $originalValue);
}
$value = StringUtils::SubString($value, 0, $columnMaxLength, $column->GetGrid()->GetPage()->GetContentEncoding());
$value .= '... <a class="js-more-hint" href="' . $column->GetMoreLink() . '">' . $this->captions->GetMessageString('more') . '</a>' . '<div class="js-more-box hide">' . $originalValue . '</div>';
}
if ($this->HtmlMarkupAvailable() && $column->GetReplaceLFByBR()) {
$value = str_replace("\n", "<br/>", $value);
}
$this->result = $value;
}
}