mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
allow to pass classes wich have constructor arguments
This commit is contained in:
parent
5c52352eb5
commit
f9d4fb90cd
@ -65,7 +65,7 @@ class FormTypeParser implements ParserInterface
|
||||
public function parse($type)
|
||||
{
|
||||
if (is_string($type) && class_exists($type)) {
|
||||
$type = new $type();
|
||||
$item = unserialize(sprintf('O:%d:"%s":0:{}', strlen($item), $item));
|
||||
}
|
||||
|
||||
$form = $this->formFactory->create($type);
|
||||
|
Loading…
x
Reference in New Issue
Block a user