protected function generatePrototype(FormField $field)
    {
        $value = $field instanceof ChildFormType ? false : null;
        $field->setOption('is_prototype', true);
        $field = $this->setupChild($field, $this->getPrototypeName(), $value);

        if ($field instanceof ChildFormType) {
            foreach ($field->getChildren() as $child) {
                if ($child instanceof CollectionType) {
                    $child->preparePrototype($child->prototype());
                }
            }
        }

        $this->proto = $field;
    }
protected function generatePrototype(FormField $field)
    {
        $value = $field instanceof ChildFormType ? false : null;
        $field->setOption('is_prototype', true);
        $field = $this->setupChild($field, $this->getPrototypeName(), $value);

        if ($field instanceof ChildFormType) {
            foreach ($field->getChildren() as $child) {
                if ($child instanceof CollectionType) {
                    $child->preparePrototype($child->prototype());
                }
            }
        }

        $this->proto = $field;
    }
protected function generatePrototype ( FormField $ field ) { $ value = $ field instanceof ChildFormType ? false : null ; $ field -> setOption ( 'is_prototype' , true ) ; $ field = $ this -> setupChild ( $ field , $ this -> getPrototypeName ( ) , $ value ) ; if ( $ field instanceof ChildFormType ) { foreach ( $ field -> getChildren ( ) as $ child ) { if ( $ child instanceof CollectionType ) { $ child -> preparePrototype ( $ child -> prototype ( ) ) ; } } } $ this -> proto = $ field ; }
Generate prototype for regular form field.

@param FormField $field
@return void
Generate prototype for regular form field .