diff --git a/Form/Factory/FormFactory.php b/Form/Factory/FormFactory.php index 93827f8514..9c21abbe8e 100644 --- a/Form/Factory/FormFactory.php +++ b/Form/Factory/FormFactory.php @@ -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); } }