Skip to content

Commit

Permalink
Merge pull request #736 from BenjaminPaap/pass_options
Browse files Browse the repository at this point in the history
Options for form were not passed through
  • Loading branch information
willdurand committed Oct 26, 2015
2 parents f8b038f + 490a908 commit 329e226
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Parser/FormTypeParser.php
Expand Up @@ -306,16 +306,16 @@ private function getTypeInstance($type)
return $refl->newInstance();
}

private function createForm($item)
private function createForm($item, $data = null, array $options = [])
{
if ($this->implementsType($item)) {
$type = $this->getTypeInstance($item);

return $this->formFactory->create($type);
return $this->formFactory->create($type, $data, $options);
}

try {
return $this->formFactory->create($item);
return $this->formFactory->create($item, $data, $options);
} catch (UnexpectedTypeException $e) {
// nothing
} catch (InvalidArgumentException $e) {
Expand Down

0 comments on commit 329e226

Please sign in to comment.