mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +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();
|
return $refl->newInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
private function createForm($item)
|
private function createForm($item, $data = null, array $options = [])
|
||||||
{
|
{
|
||||||
if ($this->implementsType($item)) {
|
if ($this->implementsType($item)) {
|
||||||
$type = $this->getTypeInstance($item);
|
$type = $this->getTypeInstance($item);
|
||||||
|
|
||||||
return $this->formFactory->create($type);
|
return $this->formFactory->create($type, $data, $options);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return $this->formFactory->create($item);
|
return $this->formFactory->create($item, $data, $options);
|
||||||
} catch (UnexpectedTypeException $e) {
|
} catch (UnexpectedTypeException $e) {
|
||||||
// nothing
|
// nothing
|
||||||
} catch (InvalidArgumentException $e) {
|
} catch (InvalidArgumentException $e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user