mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43171 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b723898551
commit
8dcdce64c2
@ -58,6 +58,9 @@ class Text extends DBField {
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Caution: Not XML/HTML-safe - does not respect closing tags.
|
||||||
|
*/
|
||||||
function FirstSentence() {
|
function FirstSentence() {
|
||||||
$data = Convert::xml2raw( $this->value );
|
$data = Convert::xml2raw( $this->value );
|
||||||
|
|
||||||
@ -69,6 +72,9 @@ class Text extends DBField {
|
|||||||
return $this->Summary(20);
|
return $this->Summary(20);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Caution: Not XML/HTML-safe - does not respect closing tags.
|
||||||
|
*/
|
||||||
function Summary($maxWords = 50) {
|
function Summary($maxWords = 50) {
|
||||||
|
|
||||||
// get first sentence?
|
// 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.
|
* 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) {
|
function BigSummary($maxWords = 50, $plain = 1) {
|
||||||
|
|
||||||
@ -149,6 +156,9 @@ class Text extends DBField {
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Caution: Not XML/HTML-safe - does not respect closing tags.
|
||||||
|
*/
|
||||||
function FirstParagraph($plain = 1) {
|
function FirstParagraph($plain = 1) {
|
||||||
// get first sentence?
|
// get first sentence?
|
||||||
// this needs to be more robust
|
// this needs to be more robust
|
||||||
|
Loading…
Reference in New Issue
Block a user