Fix nonexistent key id in twig of data collector

This commit is contained in:
François Pluchino 2013-10-28 17:47:24 +01:00
parent d866a5acc4
commit 19c74f3b1d

View File

@ -123,7 +123,9 @@ class FormDataExtractor implements FormDataExtractorInterface
*/ */
public function extractViewVariables(FormView $view) public function extractViewVariables(FormView $view)
{ {
$data = array(); $data = array(
'id' => $view->vars['id']
);
foreach ($view->vars as $varName => $value) { foreach ($view->vars as $varName => $value) {
$data['view_vars'][$varName] = $this->valueExporter->exportValue($value); $data['view_vars'][$varName] = $this->valueExporter->exportValue($value);