mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 07:41:43 +03:00
Fix embedded collection of custom FormType Error
Fix an error when trying to use embedded form collections. Referenced issue: #442
This commit is contained in:
parent
55f26508ab
commit
4939d116e0
@ -145,11 +145,11 @@ class FormTypeParser implements ParserInterface
|
||||
$bestType = sprintf('array of %ss', $subType);
|
||||
} else {
|
||||
// Embedded form collection
|
||||
$type = $config->getOption('type');
|
||||
$subForm = $this->formFactory->create($type, null, $config->getOption('options', array()));
|
||||
$embbededType = $config->getOption('type');
|
||||
$subForm = $this->formFactory->create($embbededType, null, $config->getOption('options', array()));
|
||||
$children = $this->parseForm($subForm);
|
||||
$actualType = DataTypes::COLLECTION;
|
||||
$subType = is_object($type) ? get_class($type) : $type;
|
||||
$subType = is_object($embbededType) ? get_class($embbededType) : $embbededType;
|
||||
|
||||
if (class_exists($subType)) {
|
||||
$parts = explode('\\', $subType);
|
||||
|
Loading…
x
Reference in New Issue
Block a user