public function modify($name, $type = 'text', array $options = [], $overwriteOptions = false)
    {
        // If we don't want to overwrite options, we merge them with old options.
        if ($overwriteOptions === false && $this->has($name)) {
            $options = $this->formHelper->mergeOptions(
                $this->getField($name)->getOptions(),
                $options
            );
        }

        return $this->add($name, $type, $options, true);
    }
public function modify($name, $type = 'text', array $options = [], $overwriteOptions = false)
    {
        // If we don't want to overwrite options, we merge them with old options.
        if ($overwriteOptions === false && $this->has($name)) {
            $options = $this->formHelper->mergeOptions(
                $this->getField($name)->getOptions(),
                $options
            );
        }

        return $this->add($name, $type, $options, true);
    }
public function modify ( $ name , $ type = 'text' , array $ options = [ ] , $ overwriteOptions = false ) { // If we don't want to overwrite options, we merge them with old options. if ( $ overwriteOptions === false && $ this -> has ( $ name ) ) { $ options = $ this -> formHelper -> mergeOptions ( $ this -> getField ( $ name ) -> getOptions ( ) , $ options ) ; } return $ this -> add ( $ name , $ type , $ options , true ) ; }
Modify existing field. If it doesn't exist, it is added to form.

@param string $name
@param string $type
@param array  $options
@param bool   $overwriteOptions
@return Form
Modify existing field . If it doesn t exist it is added to form .