From 42b8d3da0423fec234f8e9edacfeb0d5cb87c4c9 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Sat, 29 Oct 2011 17:09:12 +1300 Subject: [PATCH] MINOR: Use FieldList over deprecated FieldSet --- forms/FieldGroup.php | 10 +++++----- model/DataObject.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/forms/FieldGroup.php b/forms/FieldGroup.php index 283455ecc..c1d9dfa2c 100644 --- a/forms/FieldGroup.php +++ b/forms/FieldGroup.php @@ -71,7 +71,7 @@ class FieldGroup extends CompositeField { */ function Name(){ if(!$this->title) { - $fs = $this->FieldSet(); + $fs = $this->FieldList(); $compositeTitle = ''; $count = 0; foreach($fs as $subfield){ @@ -93,7 +93,7 @@ class FieldGroup extends CompositeField { * it is easier to overwrite the
behaviour in a more specific class */ function Field() { - $fs = $this->FieldSet(); + $fs = $this->FieldList(); $spaceZebra = isset($this->zebra) ? " fieldgroup-$this->zebra" : ''; $idAtt = isset($this->id) ? " id=\"{$this->id}\"" : ''; $content = "
"; @@ -143,7 +143,7 @@ HTML; } function Message() { - $fs = $this->FieldSet(); + $fs = $this->FieldList(); foreach($fs as $subfield) { if($m = $subfield->Message()) $message[] = $m; } @@ -151,7 +151,7 @@ HTML; } function MessageType(){ - $fs = $this->FieldSet(); + $fs = $this->FieldList(); foreach($fs as $subfield) { if($m = $subfield->MessageType()) $MessageType[] = $m; } @@ -164,7 +164,7 @@ HTML; * This allows fields within this fieldgroup to still allow them to get valuated. */ function jsValidation(){ - $fs = $this->FieldSet(); + $fs = $this->FieldList(); $validationCode = ''; foreach($fs as $subfield) { diff --git a/model/DataObject.php b/model/DataObject.php index 3eda4742c..49ffcf000 100644 --- a/model/DataObject.php +++ b/model/DataObject.php @@ -1847,7 +1847,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity /** * Centerpiece of every data administration interface in Silverstripe, - * which returns a {@link FieldSet} suitable for a {@link Form} object. + * which returns a {@link FieldList} suitable for a {@link Form} object. * If not overloaded, we're using {@link scaffoldFormFields()} to automatically * generate this set. To customize, overload this method in a subclass * or extended onto it by using {@link DataExtension->updateCMSFields()}.