mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
700cb7c68b
commit
3ae2a7e605
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user