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