@@ -216,9 +216,9 @@ public function renderLabel(FormView $view, $label = null, array $variables = ar
216
216
protected function render (FormView $ view , $ section , array $ variables = array ())
217
217
{
218
218
$ mainTemplate = in_array ($ section , array ('widget ' , 'row ' ));
219
- if ($ mainTemplate && $ view ->isRendered ()) {
220
219
221
- return '' ;
220
+ if ($ mainTemplate && $ view ->isRendered ()) {
221
+ return '' ;
222
222
}
223
223
224
224
if (null === $ this ->template ) {
@@ -240,7 +240,7 @@ protected function render(FormView $view, $section, array $variables = array())
240
240
$ types = $ view ->get ('types ' );
241
241
$ types [] = $ custom ;
242
242
$ typeIndex = count ($ types ) - 1 ;
243
- $ this ->varStack [$ rendering ] = array (
243
+ $ this ->varStack [$ rendering ] = array (
244
244
'variables ' => array_replace_recursive ($ view ->all (), $ variables ),
245
245
'types ' => $ types ,
246
246
);
@@ -250,7 +250,6 @@ protected function render(FormView $view, $section, array $variables = array())
250
250
$ types [$ typeIndex ] .= '_ ' .$ section ;
251
251
252
252
if (isset ($ blocks [$ types [$ typeIndex ]])) {
253
-
254
253
$ this ->varStack [$ rendering ]['typeIndex ' ] = $ typeIndex ;
255
254
256
255
// we do not call renderBlock here to avoid too many nested level calls (XDebug limits the level to 100 by default)
@@ -331,7 +330,6 @@ public function getName()
331
330
protected function getBlocks (FormView $ view )
332
331
{
333
332
if (!$ this ->blocks ->contains ($ view )) {
334
-
335
333
$ rootView = !$ view ->hasParent ();
336
334
337
335
$ templates = $ rootView ? $ this ->resources : array ();
@@ -346,6 +344,7 @@ protected function getBlocks(FormView $view)
346
344
if (!$ template instanceof \Twig_Template) {
347
345
$ template = $ this ->environment ->loadTemplate ($ template );
348
346
}
347
+
349
348
$ templateBlocks = array ();
350
349
do {
351
350
$ templateBlocks = array_merge ($ template ->getBlocks (), $ templateBlocks );
0 commit comments