From 3ae2a7e60551096ae45c1ab3d02df642634e06c5 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Wed, 20 Aug 2008 05:11:07 +0000 Subject: [PATCH] MINOR PHPdoc for FieldSet->replaceField() git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61161 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- forms/FieldSet.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/forms/FieldSet.php b/forms/FieldSet.php index e44710076..41dc8dd40 100755 --- a/forms/FieldSet.php +++ b/forms/FieldSet.php @@ -135,6 +135,14 @@ class FieldSet extends DataObjectSet { foreach($fields as $field) $tab->push($field); } + /** + * Replace a single field with another. + * + * @param string $fieldName The name of the field to replace + * @param FormField $newField The field object to replace with + * @return boolean TRUE field was successfully replaced + * FALSE field wasn't found, nothing changed + */ public function replaceField($fieldName, $newField) { if($this->sequentialSet) $this->sequentialSet = null; foreach($this->items as $i => $field) {