@@ -28,6 +28,25 @@ function LimitCharacters($limit = 20, $add = "...") {
2828 return (strlen ($ value ) > $ limit ) ? substr ($ value , 0 , $ limit ) . $ add : $ value ;
2929 }
3030
31+ static $ casting = array (
32+ "AbsoluteLinks " => "HTMLText " ,
33+ "BigSummary " => "HTMLText " ,
34+ "ContextSummary " => "HTMLText " ,
35+ "FirstParagraph " => "HTMLText " ,
36+ "FirstSentence " => "HTMLText " ,
37+ "LimitCharacters " => "HTMLText " ,
38+ "LimitSentences " => "HTMLText " ,
39+ "Lower " => "HTMLText " ,
40+ "LowerCase " => "HTMLText " ,
41+ "Summary " => "HTMLText " ,
42+ "Upper " => "HTMLText " ,
43+ "UpperCase " => "HTMLText " ,
44+ 'EscapeXML ' => 'HTMLText ' ,
45+ 'LimitWordCount ' => 'HTMLText ' ,
46+ 'LimitWordCountXML ' => 'HTMLText ' ,
47+ 'NoHTML ' => 'Text ' ,
48+ );
49+
3150 /**
3251 * Create a summary of the content. This will be some section of the first paragraph, limited by
3352 * $maxWords. All internal tags are stripped out - the return value is a string
@@ -133,4 +152,4 @@ public function scaffoldSearchField($title = null) {
133152
134153}
135154
136- ?>
155+ ?>
0 commit comments