public function replaceField($name, $field)
    {
        $index = $this->getFieldIndex($name);
        $this->removeFieldAtIndex($index);
        $this->insertFields($field, $index);
    }
public function replaceField($name, $field)
    {
        $index = $this->getFieldIndex($name);
        $this->removeFieldAtIndex($index);
        $this->insertFields($field, $index);
    }
public function replaceField ( $ name , $ field ) { $ index = $ this -> getFieldIndex ( $ name ) ; $ this -> removeFieldAtIndex ( $ index ) ; $ this -> insertFields ( $ field , $ index ) ; }
Replace a field with a single field or array of fields
@param  string $name  name of field to replace
@param  NamedBuilder|NamedBuilder[] $field single or array of fields
@throws FieldNotFoundException if the field name doesn't exist
@return void
Replace a field with a single field or array of fields