Allow Modifying multiple properties
This commit is contained in:
parent
9b61402760
commit
18a6a21085
@ -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()));
|
||||
|
Loading…
Reference in New Issue
Block a user