MINOR: Use FieldList over deprecated FieldSet

This commit is contained in:
Sam Minnee 2011-10-29 17:09:12 +13:00
parent 22e5617ee2
commit 42b8d3da04
2 changed files with 6 additions and 6 deletions

View File

@ -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 <div class="field"> 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 = "<div class=\"fieldgroup$spaceZebra\"$idAtt>";
@ -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) {

View File

@ -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()}.