Skip to content

Commit

Permalink
Options for form were not passed through
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminPaap committed Oct 26, 2015
1 parent f8b038f commit 490a908
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 490a908

Please sign in to comment.