/** * @param Fieldset $fieldset */ protected function handleCollections(Fieldset $fieldset) { foreach ($fieldset->getFieldsets() as $childFieldset) { // Configure collection: if ($childFieldset instanceof Collection) { $this->configureInputFilter($childFieldset); } // Search deeper: $this->handleCollections($childFieldset); } }