->addEventListener(FormEvents::SUBMIT, function (FormEvent $event) {
$user = $event->getData();
$form = $event->getForm();
if (!$user) {
return;
}
$manager = $user->getManagerId();
if (!$manager) {
return;
}
$user->setManagerId($manager->getId());
})