File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 "php" : " 8.1 - 8.5" ,
1919 "nette/component-model" : " ^3.1" ,
2020 "nette/http" : " ^3.3" ,
21- "nette/utils" : " ^4.0.4 "
21+ "nette/utils" : " ^4.0.10 "
2222 },
2323 "require-dev" : {
2424 "nette/application" : " ^3.0" ,
Original file line number Diff line number Diff line change @@ -300,9 +300,15 @@ public function addComponent(
300300 * Iterates over all form controls.
301301 * @return iterable<Control>
302302 */
303- public function getControls (): \ Iterator
303+ public function getControls (): iterable
304304 {
305- return $ this ->getComponents (true , Control::class);
305+ return Nette \Utils \Iterables::repeatable (function () {
306+ foreach ($ this ->getComponentTree () as $ component ) {
307+ if ($ component instanceof Control) {
308+ yield $ component ->getName () => $ component ;
309+ }
310+ }
311+ });
306312 }
307313
308314
You can’t perform that action at this time.
0 commit comments