Class LiteralField
This field lets you put an arbitrary piece of HTML into your forms.
Usage
new LiteralField ( $name = "literalfield", $content = '<b>some bold text</b> and <a href="http://silverstripe.com">a link</a>' )
- Object
-
ViewableData
implements
IteratorAggregate
-
RequestHandler
-
FormField
-
DatalessField
-
LiteralField
Methods summary
public
|
|
public
string
|
#
FieldHolder( array $properties = array() )
Returns the field's representation in the form. For dataless fields, this defaults to $Field. |
public
string
|
#
Field( array $properties = array() )
Returns the form field - used by templates. Although FieldHolder is generally what is inserted into templates, all of the field holder templates make use of $Field. It's expected that FieldHolder will give you the "complete" representation of the field on the form, whereas Field will give you the core editing widget, such as an input tag. |
public
|
|
public
string
|
|
public
|
#
setValue( mixed $value )
Synonym of |
public
|
Methods inherited from DatalessField
SmallFieldHolder(),
Type(),
getAllowHTML(),
getAttributes(),
hasData(),
setAllowHTML()
Methods inherited from FormField
ID(),
LeftTitle(),
Link(),
Message(),
MessageType(),
Name(),
Required(),
RightTitle(),
Title(),
Value(),
addExtraClass(),
attrTitle(),
attrValue(),
createTag(),
dataValue(),
debug(),
describe(),
extraClass(),
forTemplate(),
getAttribute(),
getAttributesHTML(),
getCustomValidationMessage(),
getDescription(),
getFieldHolderTemplate(),
getFieldHolderTemplates(),
getForm(),
getName(),
getSmallFieldHolderTemplate(),
getSmallFieldHolderTemplates(),
getTabIndex(),
getTemplate(),
getTemplates(),
hasClass(),
isComposite(),
isDisabled(),
isReadonly(),
name_to_label(),
performDisabledTransformation(),
removeExtraClass(),
rootFieldList(),
rootFieldSet(),
saveInto(),
securityTokenEnabled(),
setAttribute(),
setContainerFieldList(),
setContainerFieldSet(),
setCustomValidationMessage(),
setDescription(),
setDisabled(),
setError(),
setFieldHolderTemplate(),
setForm(),
setLeftTitle(),
setName(),
setReadonly(),
setRightTitle(),
setSmallFieldHolderTemplate(),
setTabIndex(),
setTemplate(),
setTitle(),
transform(),
validate()
Methods inherited from RequestHandler
allowedActions(),
checkAccessAction(),
getRequest(),
handleRequest(),
hasAction(),
httpError(),
isAjax(),
setDataModel(),
setRequest()
Methods inherited from ViewableData
ATT_val(),
CSSClasses(),
Debug(),
JS_val(),
Me(),
RAW_val(),
SQL_val(),
ThemeDir(),
XML_val(),
__get(),
__isset(),
__set(),
buildCastingCache(),
cachedCall(),
castingClass(),
castingHelper(),
castingHelperPair(),
castingObjectCreator(),
castingObjectCreatorPair(),
customise(),
defineMethods(),
escapeTypeForField(),
getField(),
getIterator(),
getXMLValues(),
hasField(),
hasValue(),
obj(),
renderWith(),
setCustomisedObj(),
setField()
Methods inherited from Object
__call(),
__toString(),
addMethodsFrom(),
addStaticVars(),
addWrapperMethod(),
add_extension(),
add_static_var(),
allMethodNames(),
cacheToFile(),
clearCache(),
combined_static(),
config(),
create(),
createMethod(),
create_from_string(),
exists(),
extend(),
getCustomClass(),
getExtensionInstance(),
getExtensionInstances(),
get_extensions(),
get_extra_config_sources(),
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(),
static_lookup(),
strong_create(),
uninherited(),
uninherited_static(),
useCustomClass()
Magic methods summary
Properties summary
protected
string
|
$content |
#
$content |
Properties inherited from DatalessField
Properties inherited from FormField
$attributes,
$containerFieldList,
$customValidationMessage,
$description,
$disabled,
$dontEscape,
$extraClass,
$extraClasses,
$fieldHolderTemplate,
$form,
$leftTitle,
$message,
$messageType,
$name,
$readonly,
$rightTitle,
$smallFieldHolderTemplate,
$template,
$title,
$value
Properties inherited from RequestHandler
$allowed_actions,
$brokenOnConstruct,
$model,
$request,
$url_handlers
Properties inherited from ViewableData
$casting,
$customisedObject,
$default_cast,
$failover
Comments
Use the Silverstripe Forum to ask questions.