@@ -87,6 +87,15 @@ class Utils | |||
return $text; | |||
} | |||
public function limitTextByLength($text, $length) | |||
{ | |||
if(strlen($text) > $length) { | |||
$text = substr($text, 0, $length).' ... ' ; | |||
} | |||
return $text ; | |||
} | |||
function truncateHtml($text, $length = 100, $ending = '...', $exact = false, $considerHtml = true) | |||
{ | |||
if ($considerHtml) { |