update variable name to match the option name

This commit is contained in:
IamPersistent 2011-10-17 02:58:01 -07:00
parent b53f000061
commit c507b1db73

View File

@ -25,8 +25,8 @@ class CollectionType extends AbstractType
public function buildForm(FormBuilder $builder, array $options)
{
if ($options['allow_add'] && $options['prototype']) {
$prototypeId = empty($options['prototype_name']) ? '$$name$$' : '$$' . $options['prototype_name'] . '$$';
$prototype = $builder->create($prototypeId, $options['type'], $options['options']);
$prototypeName = empty($options['prototype_name']) ? '$$name$$' : '$$' . $options['prototype_name'] . '$$';
$prototype = $builder->create($prototypeName, $options['type'], $options['options']);
$builder->setAttribute('prototype', $prototype->getForm());
}