mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 07:41:43 +03:00
Options for form were not passed through
This commit is contained in:
parent
f8b038faf2
commit
490a9081ec
@ -306,16 +306,16 @@ class FormTypeParser implements ParserInterface
|
||||
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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user