Class FieldSet
DataObjectSet designed for form fields. It extends the DataObjectSet with the ability to get a sequential set of fields.
- Object
-
ViewableData
implements
IteratorAggregate
-
DataObjectSet
implements
IteratorAggregate,
Countable
-
FieldSet
Direct known subclasses
Methods summary
public
|
#
__construct(
Create a new DataObjectSet. If you pass one or more arguments, it will try to
convert them into |
public
|
#
dataFields( )
Return a sequential set of all fields that have data. This excludes wrapper composite fields as well as heading / help text fields. |
public
|
|
protected
|
|
protected
|
|
public
|
#
addFieldToTab( string $tabName,
Add an extra field to a tab within this fieldset. This is most commonly used when overloading getCMSFields() |
public
|
#
addFieldsToTab( string $tabName, array $fields )
Add a number of extra fields to a tab within this fieldset. This is most commonly used when overloading getCMSFields() |
public
|
#
removeFieldFromTab( string $tabName, string $fieldName )
Remove the given field from the given tab in the field. |
public
|
#
removeFieldsFromTab( string $tabName, array $fields )
Removes a number of fields from a Tab/TabSet within this FieldSet. |
public
|
#
removeByName( string $fieldName, boolean $dataFieldOnly = false )
Remove a field from this FieldSet by Name. The field could also be inside a CompositeField. |
public
boolean
|
#
replaceField( string $fieldName,
Replace a single field with another. Ignores dataless fields such as Tabs and TabSets |
public
boolean
|
#
renameField( string $fieldName, string $newFieldTitle )
Rename the title of a particular field name in this set. |
public
boolean
|
|
public
|
#
findOrMakeTab( string $tabName, string $title = null )
Returns the specified tab object, creating it if necessary. |
public
|
#
fieldByName( mixed $name )
Returns a named field. You can use dot syntax to get fields from child composite fields |
public
|
#
dataFieldByName( string $name )
Returns a named field in a sequential set. Use this if you're using nested FormFields. |
public
|
#
insertBefore(
Inserts a field before a particular field in a FieldSet. |
public
|
#
insertAfter(
Inserts a field after a particular field in a FieldSet. |
public
|
|
protected
|
#
onBeforeInsert( mixed $item )
Handler method called before the FieldSet is going to be manipulated. |
public
|
|
public
|
|
public
|
#
HiddenFields( )
Return all <input type="hidden"> fields in a form - including fields nested in CompositeFields. Useful when doing custom field layouts. |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
#
changeFieldOrder( array $fieldNames )
Change the order of fields in this FieldSet by specifying an ordered list of field names. This works well in conjunction with SilverStripe's scaffolding functions: take the scaffold, and shuffle the fields around to the order that you want. |
public
Position
|
#
fieldPosition( string|
Find the numerical position of a field within the children collection. Doesn't work recursively. |
Methods inherited from DataObjectSet
Count(),
CurrentPage(),
First(),
FirstItem(),
GroupedBy(),
Last(),
LastItem(),
MoreThanOnePage(),
NextLink(),
NotFirstPage(),
NotLastPage(),
Pages(),
PaginationSummary(),
PrevLink(),
TotalItems(),
TotalPages(),
UL(),
addWithoutWrite(),
buildNestedUL(),
column(),
containsIDs(),
debug(),
destroy(),
emptyItems(),
exists(),
find(),
forTemplate(),
getChildrenAsUL(),
getIterator(),
getPageLimits(),
getRange(),
groupBy(),
groupWithParents(),
hasValue(),
insertFirst(),
map(),
merge(),
onlyContainsIDs(),
parseQueryLimit(),
pop(),
remove(),
removeDuplicates(),
replace(),
setPageLength(),
setPageLimits(),
setPaginationGetVar(),
shift(),
sort(),
toArray(),
toDropDownMap(),
toNestedArray(),
unshift()
Methods inherited from ViewableData
ATT_val(),
BaseHref(),
CSSClasses(),
ColumnBreak(),
ColumnCalc(),
ColumnNumber(),
ColumnPad(),
ColumnPos(),
CurrentMember(),
Debug(),
Even(),
EvenOdd(),
FirstLast(),
HasPerm(),
IsAjax(),
JS_val(),
Me(),
Middle(),
MiddleString(),
Modulus(),
MultipleOf(),
Odd(),
Pos(),
RAW_val(),
SQL_val(),
ThemeDir(),
ThemeName(),
Top(),
XML_val(),
__get(),
__isset(),
__set(),
buildCastingCache(),
cachedCall(),
castingClass(),
castingHelper(),
castingHelperPair(),
castingObjectCreator(),
castingObjectCreatorPair(),
customise(),
defineMethods(),
escapeTypeForField(),
getField(),
getSecurityID(),
getXMLValues(),
hasField(),
i18nLocale(),
iteratorProperties(),
obj(),
renderWith(),
setCustomisedObj(),
setField()
Methods inherited from Object
__call(),
__toString(),
__wakeup(),
addMethodsFrom(),
addStaticVars(),
addWrapperMethod(),
add_extension(),
add_static_var(),
allMethodNames(),
cacheToFile(),
cacheToFileWithArgs(),
clearCache(),
combined_static(),
create(),
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()
Methods inherited from Countable
Magic methods summary
Properties summary
protected
array
|
$sequentialSet |
#
Cached flat representation of all fields in this set, including fields nested in CompositeFields. |
protected
array
|
$sequentialSaveableSet | |
protected
mixed
|
$containerField |
Properties inherited from DataObjectSet
$current,
$first,
$items,
$last,
$odd,
$pageLength,
$pageStart,
$paginationGetVar,
$totalSize
Properties inherited from ViewableData
$casting,
$customisedObject,
$default_cast,
$failover,
$iteratorPos,
$iteratorTotalItems