public function preparePrototype(FormField $field)
    {
        if (!$field->getOption('is_prototype')) {
            throw new \InvalidArgumentException(
                'Field ['.$field->getRealName().'] is not a valid prototype object.'
            );
        }

        $this->children = [];
        $this->children[] = $field;
    }
public function preparePrototype(FormField $field)
    {
        if (!$field->getOption('is_prototype')) {
            throw new \InvalidArgumentException(
                'Field ['.$field->getRealName().'] is not a valid prototype object.'
            );
        }

        $this->children = [];
        $this->children[] = $field;
    }
public function preparePrototype ( FormField $ field ) { if ( ! $ field -> getOption ( 'is_prototype' ) ) { throw new \ InvalidArgumentException ( 'Field [' . $ field -> getRealName ( ) . '] is not a valid prototype object.' ) ; } $ this -> children = [ ] ; $ this -> children [ ] = $ field ; }
Prepare collection for prototype by adding prototype as child.

@param FormField $field
@return void
Prepare collection for prototype by adding prototype as child .