bug #9397 [BUG][Form] Fix nonexistent key id in twig of data collector (francoispluchino)
This PR was merged into the master branch.
Discussion
----------
[BUG][Form] Fix nonexistent key id in twig of data collector
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
When you create a single button form type, the id of data collector does not exist. It's caused by the PR #9394.
Commits
-------
19c74f3
Fix nonexistent key id in twig of data collector
This commit is contained in:
commit
d2daf5daac
@ -123,7 +123,9 @@ class FormDataExtractor implements FormDataExtractorInterface
|
||||
*/
|
||||
public function extractViewVariables(FormView $view)
|
||||
{
|
||||
$data = array();
|
||||
$data = array(
|
||||
'id' => $view->vars['id']
|
||||
);
|
||||
|
||||
foreach ($view->vars as $varName => $value) {
|
||||
$data['view_vars'][$varName] = $this->valueExporter->exportValue($value);
|
||||
|
Reference in New Issue
Block a user