Class HTMLText
Represents a large text field that contains HTML content. This behaves
similarly to Text, but the template processor won't escape any HTML
content within it.
- Object
-
ViewableData
implements
IteratorAggregate
-
DBField
-
StringField
-
Text
-
HTMLText
See:
HTMLVarcharSee:
TextSee:
VarcharLocated at sapphire/core/model/fieldtypes/HTMLText.php
Methods summary
public
string
|
#
LimitCharacters( integer $limit = 20, string $add = "..." )
Limit this field's content by a number of characters. This makes use of strip_tags() to avoid malforming the HTML tags in the string of text. |
public
string
|
|
public
|
#
FirstSentence( )
Returns the first sentence from the first paragraph. If it can't figure out what the first paragraph is (or there isn't one) it returns the same as Summary() |
public
string
|
|
public
boolean
|
|
public
|
|
public
|
Methods inherited from Text
AbsoluteLinks(),
BigSummary(),
ContextSummary(),
EscapeXML(),
FirstParagraph(),
LimitSentences(),
LimitWordCount(),
LimitWordCountXML(),
NoHTML(),
Parse(),
requireField()
Methods inherited from StringField
Lower(),
Upper(),
__construct(),
getNullifyEmpty(),
prepValueForDB(),
setNullifyEmpty(),
setOptions()
Methods inherited from DBField
ATT(),
HTML(),
HTMLATT(),
JS(),
LowerCase(),
RAW(),
RAWURLATT(),
URLATT(),
UpperCase(),
XML(),
addToQuery(),
create(),
debug(),
defaultSearchFilter(),
exists(),
getName(),
getValue(),
nullValue(),
saveInto(),
setName(),
setTable(),
setValue(),
writeToManipulation()
Methods inherited from ViewableData
ATT_val(),
BaseHref(),
CSSClasses(),
CurrentMember(),
CurrentPage(),
Debug(),
Even(),
EvenOdd(),
First(),
FirstLast(),
HasPerm(),
IsAjax(),
JS_val(),
Last(),
Me(),
Middle(),
MiddleString(),
Modulus(),
MultipleOf(),
Odd(),
Pos(),
RAW_val(),
SQL_val(),
ThemeDir(),
Top(),
TotalItems(),
XML_val(),
__get(),
__isset(),
__set(),
buildCastingCache(),
cachedCall(),
castingClass(),
castingHelper(),
castingHelperPair(),
castingObjectCreator(),
castingObjectCreatorPair(),
customise(),
defineMethods(),
escapeTypeForField(),
getField(),
getIterator(),
getSecurityID(),
getXMLValues(),
hasField(),
i18nLocale(),
iteratorProperties(),
obj(),
renderWith(),
setCustomisedObj(),
setField()
Methods inherited from Object
__call(),
__toString(),
addMethodsFrom(),
addStaticVars(),
addWrapperMethod(),
add_extension(),
add_static_var(),
allMethodNames(),
cacheToFile(),
cacheToFileWithArgs(),
clearCache(),
combined_static(),
createMethod(),
create_from_string(),
extInstance(),
extend(),
getCustomClass(),
getExtensionInstance(),
getExtensionInstances(),
get_extensions(),
get_static(),
hasExtension(),
hasMethod(),
has_extension(),
invokeWithExtensions(),
is_a(),
loadCache(),
parentClass(),
parse_class_spec(),
remove_extension(),
sanitiseCachename(),
saveCache(),
set_stat(),
set_static(),
set_uninherited(),
stat(),
strong_create(),
uninherited(),
uninherited_static(),
useCustomClass()
Magic methods summary
Properties summary
public static
string
|
$escape_type |
#
The escape type for this field when inserted into a template - either "xml" or "raw". |
public static
array
|
$casting |
#
An array of objects to cast certain fields to. This is set up as an array in the format: |
Properties inherited from StringField
Properties inherited from DBField
$arrayValue,
$defaultVal,
$default_search_filter_class,
$name,
$tableName,
$value
Properties inherited from ViewableData
$customisedObject,
$default_cast,
$failover,
$iteratorPos,
$iteratorTotalItems
Comments
Use the Silverstripe Forum to ask questions.