src/Forms/FieldList.php
public function recursiveWalk(callable $callback)
    {
        $stack = $this->toArray();
        while (!empty($stack)) {
            /** @var FormField $field */
            $field = array_shift($stack);
            $callback($field);
            if ($field instanceof CompositeField) {
                $stack = array_merge($field->getChildren()->toArray(), $stack);
            }
        }
    }
public function recursiveWalk(callable $callback)
    {
        $stack = $this->toArray();
        while (!empty($stack)) {
            /** @var FormField $field */
            $field = array_shift($stack);
            $callback($field);
            if ($field instanceof CompositeField) {
                $stack = array_merge($field->getChildren()->toArray(), $stack);
            }
        }
    }
public function recursiveWalk ( callable $ callback ) { $ stack = $ this -> toArray ( ) ; while ( ! empty ( $ stack ) ) { /** @var FormField $field */ $ field = array_shift ( $ stack ) ; $ callback ( $ field ) ; if ( $ field instanceof CompositeField ) { $ stack = array_merge ( $ field -> getChildren ( ) -> toArray ( ) , $ stack ) ; } } }
Iterate over each field in the current list recursively

@param callable $callback
Iterate over each field in the current list recursively