File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
src/Symfony/Component/Form Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,21 @@ public function setAttribute($name, $value)
112
112
*/
113
113
public function isRendered ()
114
114
{
115
- return $ this ->rendered ;
115
+ if (true === $ this ->rendered || 0 == count ($ this ->children )) {
116
+ return $ this ->rendered ;
117
+ }
118
+
119
+ if (count ($ this ->children ) > 0 ) {
120
+ foreach ($ this ->children as $ child ) {
121
+ if (!$ child ->isRendered ()) {
122
+ return false ;
123
+ }
124
+ }
125
+
126
+ return $ this ->rendered = true ;
127
+ } else {
128
+ return false ;
129
+ }
116
130
}
117
131
118
132
/**
@@ -258,10 +272,6 @@ public function offsetUnset($name)
258
272
*/
259
273
public function getIterator ()
260
274
{
261
- if (count ($ this ->children )) {
262
- $ this ->rendered = true ;
263
- }
264
-
265
275
return new \ArrayIterator ($ this ->children );
266
276
}
267
277
You can’t perform that action at this time.
0 commit comments