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:
Sean Harvey 2008-12-16 11:33:11 +00:00 committed by Sam Minnee
parent 5f0bbbc0da
commit 05dd641817

View File

@ -81,10 +81,11 @@ class Text extends DBField {
* are converted to & * are converted to &
* *
* @param int $numWords Number of words to limit by * @param int $numWords Number of words to limit by
* @param string $add Ellipsis to add to the end of truncated string
* @return string * @return string
*/ */
function LimitWordCountXML($numWords = 26) { function LimitWordCountXML($numWords = 26, $add = '...') {
$ret = $this->LimitWordCount($numWords); $ret = $this->LimitWordCount($numWords, $add);
return Convert::raw2xml($ret); return Convert::raw2xml($ret);
} }