From 18a6a2108504cdf8e88dd0612f0e679c8ca74258 Mon Sep 17 00:00:00 2001 From: tim Date: Thu, 29 Sep 2022 00:45:34 +0200 Subject: [PATCH] Allow Modifying multiple properties --- src/EntityBuilder/AbstractEntityCommand.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/EntityBuilder/AbstractEntityCommand.php b/src/EntityBuilder/AbstractEntityCommand.php index ee7c2c2..0457f68 100644 --- a/src/EntityBuilder/AbstractEntityCommand.php +++ b/src/EntityBuilder/AbstractEntityCommand.php @@ -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()));