documentation

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43171 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2007-10-07 12:17:33 +00:00
parent b723898551
commit 8dcdce64c2

View File

@ -58,6 +58,9 @@ class Text extends DBField {
return $ret;
}
/**
* Caution: Not XML/HTML-safe - does not respect closing tags.
*/
function FirstSentence() {
$data = Convert::xml2raw( $this->value );
@ -69,6 +72,9 @@ class Text extends DBField {
return $this->Summary(20);
}
/**
* Caution: Not XML/HTML-safe - does not respect closing tags.
*/
function Summary($maxWords = 50) {
// get first sentence?
@ -114,6 +120,7 @@ class Text extends DBField {
/**
* Performs the same function as the big summary, but doesnt trim new paragraphs off data.
* Caution: Not XML/HTML-safe - does not respect closing tags.
*/
function BigSummary($maxWords = 50, $plain = 1) {
@ -149,6 +156,9 @@ class Text extends DBField {
return $result;
}
/**
* Caution: Not XML/HTML-safe - does not respect closing tags.
*/
function FirstParagraph($plain = 1) {
// get first sentence?
// this needs to be more robust