mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT Allow choosing ellipsis for truncated text on Text->LimitWordCountXML()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69224 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5f0bbbc0da
commit
05dd641817
@ -81,10 +81,11 @@ class Text extends DBField {
|
||||
* are converted to &
|
||||
*
|
||||
* @param int $numWords Number of words to limit by
|
||||
* @param string $add Ellipsis to add to the end of truncated string
|
||||
* @return string
|
||||
*/
|
||||
function LimitWordCountXML($numWords = 26) {
|
||||
$ret = $this->LimitWordCount($numWords);
|
||||
function LimitWordCountXML($numWords = 26, $add = '...') {
|
||||
$ret = $this->LimitWordCount($numWords, $add);
|
||||
return Convert::raw2xml($ret);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user