ModArticlesCategoryHelper::truncate
Method to truncate introtext
The goal is to get the proper length plain text string with as much of the html intact as possible with all tags properly closed.
Signature
public function truncate(string
$html,
[integer
$maxLength = 0] )
Parameters
-
$html
- The content of the introtext to be truncated
-
$maxLength
- The maximum number of charactes to render
Returns
- string
- The truncated string