public function addFromModel(FormBuilderInterface $builder, array $model, $editMode) 
	{
        foreach( $model as $property => $parameters ) {
            if( isset($parameters['type']) && $parameters['type'] == 'group') {
                $options = array();
                if (isset($parameters['options'])) {
                    $options = $parameters['options'];
                }

                $builder->add($this->getBuilder($property, $options, $parameters['fields'], $editMode));
            } else {
                if (!isset($parameters['widget'])) {
                    throw new \RuntimeException("You must specify a widget for $property");
                }

                $widget = $parameters['widget'];
                $this->buildField($builder, $property, $widget, $editMode);
            }
        }
    }