13 public function formatShortText($value, $shortTextLimit = 100, $defaultValue =
'-') {
14 if(strlen($value)>$shortTextLimit) {
15 $a = mb_substr($value,0,$shortTextLimit-3,Yii::app()->charset);
16 $retval=CHtml::tag(
'span',array(
'title'=>$value),CHtml::encode($a.
'...'));
18 $retval=CHtml::encode($value);
20 return (!empty($retval) ? $retval : $defaultValue);
30 if (empty($urlsString)) {
33 $urlsArray = explode($splitter, $urlsString);
34 foreach ($urlsArray as &
$url) {
35 $url = CHtml::encode($url);
36 $url = CHtml::link($url, $url);
38 return implode($splitter, $urlsArray);
56 $url = (!empty($url[$arrayKey]) ? $url[$arrayKey] :
$url);
57 $urlsString .= $url . $splitter;
58 $urlsStringLen = mb_strlen($urlsString);
59 if ($urlsStringLen == $limit) {
61 } elseif ($urlsStringLen > ($limit + 1)) {
62 $urlsArray = explode($splitter, $urlsString);
63 array_pop($urlsArray);
64 array_pop($urlsArray);
65 $urlsString = implode($splitter, $urlsArray);
75 $urlsString = mb_substr($urlsString, 0, (mb_strlen($urlsString) - 1));