-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
I have the following code, it's used to edit the contact entity:
protected function execute(InputInterface $input, OutputInterface $output): int
{
$io = new SymfonyStyle($input, $output);
$contacts = $this->doctrine->getRepository(Contact::class)->findAll();
if (!$contacts) {
$io->note('No contacts found.');
return Command::SUCCESS;
}
$contact = $io->choice('Contact', $contacts);
$this->getHelper('form')->interactUsingForm(
ContactType::class,
$input,
$output,
[],
$contact
);
$this->doctrine->getManager()->flush();
$io->newLine(2);
$io->success('Contact changed');
return Command::SUCCESS;
}The input form in console looks as follows:
The question is, what should I do to clear the email field value? Hitting "enter" leave the data unchanged. Entering empty space don't change anything. I'd like to set the email to empty string or to null, now it can be done?
Metadata
Metadata
Assignees
Labels
No labels
