Allow Modifying multiple properties
This commit is contained in:
		| @@ -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)))) { |                 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)); |                     $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')) { |         } elseif ($input->getOption('modify')) { | ||||||
|             $io->info(sprintf('Modifying "%s"', $this->getEntityClass())); |             $io->info(sprintf('Modifying "%s"', $this->getEntityClass())); | ||||||
|             $entity = $this->select($io, $id); |             $entity = $this->select($io, $id); | ||||||
|  |             do { | ||||||
|                 $builder->setByQuestion($entity); |                 $builder->setByQuestion($entity); | ||||||
|  |             } while ($io->askQuestion(new ConfirmationQuestion('Modify another property?'))); | ||||||
|             $this->em->persist($entity); |             $this->em->persist($entity); | ||||||
|         } elseif ($input->getOption('delete')) { |         } elseif ($input->getOption('delete')) { | ||||||
|             $io->info(sprintf('Deleting "%s"', $this->getEntityClass())); |             $io->info(sprintf('Deleting "%s"', $this->getEntityClass())); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user