allow to pass classes wich have constructor arguments

This commit is contained in:
Klein Florian 2012-10-03 16:35:56 +02:00
parent 4cb71512f9
commit 5c52352eb5

View File

@ -48,7 +48,7 @@ class FormTypeParser implements ParserInterface
{
try {
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);