Skip to content

Commit

Permalink
Merge pull request #1582 from Gnucki/master
Browse files Browse the repository at this point in the history
Allow to pass additional options to form factory
  • Loading branch information
XWB committed Sep 3, 2015
2 parents d18641d + d954307 commit f021cb0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Form/Factory/FormFactory.php
Expand Up @@ -28,8 +28,10 @@ public function __construct(FormFactoryInterface $formFactory, $name, $type, arr
$this->validationGroups = $validationGroups;
}

public function createForm()
public function createForm(array $options = array())
{
return $this->formFactory->createNamed($this->name, $this->type, null, array('validation_groups' => $this->validationGroups));
$options = array_merge(array('validation_groups' => $this->validationGroups), $options);

return $this->formFactory->createNamed($this->name, $this->type, null, $options);
}
}

0 comments on commit f021cb0

Please sign in to comment.