Allow Modifying multiple properties

This commit is contained in:
Tim 2022-09-29 00:45:34 +02:00
parent 9b61402760
commit 18a6a21085

View File

@ -54,11 +54,13 @@ abstract class AbstractEntityCommand extends Command
if ($io->askQuestion(new ConfirmationQuestion(sprintf('Are you sure you want to create "%s" with above properties', $entity)))) {
$io->success(sprintf('Object "%s" stored successfully', $entity));
}
} while ($io->askQuestion(new ConfirmationQuestion('Create another?', false)));
} while ($io->askQuestion(new ConfirmationQuestion('Create another entity?', false)));
} elseif ($input->getOption('modify')) {
$io->info(sprintf('Modifying "%s"', $this->getEntityClass()));
$entity = $this->select($io, $id);
$builder->setByQuestion($entity);
do {
$builder->setByQuestion($entity);
} while ($io->askQuestion(new ConfirmationQuestion('Modify another property?')));
$this->em->persist($entity);
} elseif ($input->getOption('delete')) {
$io->info(sprintf('Deleting "%s"', $this->getEntityClass()));