protected function convertInput() { $input = $this->getRawInput(); $value = null; $callback = function (Radio &$radio) use(&$value, $input) { if ($radio->getValue() == $input) { $value = $radio->getModelObject(); return Component::VISITOR_STOP_TRAVERSAL; } return Component::VISITOR_CONTINUE_TRAVERSAL; }; $this->visitChildren(Radio::getIdentifier(), $callback); if ($value != null) { $this->setConvertedInput($value); } }