Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

35 linhas
1.0KB

  1. <?php
  2. namespace Lc\CaracoleBundle\Command;
  3. use Lc\SovBundle\Builder\Setting\SettingBuilder;
  4. use Symfony\Component\Console\Command\Command;
  5. use Symfony\Component\Console\Input\InputInterface;
  6. use Symfony\Component\Console\Output\OutputInterface;
  7. use Symfony\Component\Console\Style\SymfonyStyle;
  8. class MerchantSettingInitCommand extends Command
  9. {
  10. protected static $defaultName = 'setting:merchant:init';
  11. protected static $defaultDescription = 'Initialise les MerchantSetting.';
  12. protected SettingBuilder $settingBuilder;
  13. public function __construct(string $name = null, SettingBuilder $settingBuilder)
  14. {
  15. parent::__construct($name);
  16. $this->settingBuilder = $settingBuilder;
  17. }
  18. /**
  19. * {@inheritdoc}
  20. */
  21. protected function execute(InputInterface $input, OutputInterface $output)
  22. {
  23. $this->io = new SymfonyStyle($input, $output);
  24. $this->settingBuilder->initMerchantSettings();
  25. $this->io->success('Les MerchantSetting ont bien été initialisées.');
  26. return Command::SUCCESS;
  27. }
  28. }