mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +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);
|
$bestType = sprintf('array of %ss', $subType);
|
||||||
} else {
|
} else {
|
||||||
// Embedded form collection
|
// Embedded form collection
|
||||||
$type = $config->getOption('type');
|
$embbededType = $config->getOption('type');
|
||||||
$subForm = $this->formFactory->create($type, null, $config->getOption('options', array()));
|
$subForm = $this->formFactory->create($embbededType, null, $config->getOption('options', array()));
|
||||||
$children = $this->parseForm($subForm);
|
$children = $this->parseForm($subForm);
|
||||||
$actualType = DataTypes::COLLECTION;
|
$actualType = DataTypes::COLLECTION;
|
||||||
$subType = is_object($type) ? get_class($type) : $type;
|
$subType = is_object($embbededType) ? get_class($embbededType) : $embbededType;
|
||||||
|
|
||||||
if (class_exists($subType)) {
|
if (class_exists($subType)) {
|
||||||
$parts = explode('\\', $subType);
|
$parts = explode('\\', $subType);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user