MINOR PHPdoc for FieldSet->replaceField()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61161 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2008-08-20 05:11:07 +00:00
parent 700cb7c68b
commit 3ae2a7e605

View File

@ -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) {