Aimeos\ShopBundle\Command\AccountCommand::execute PHP Method

execute() protected method

Execute the console command.
protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface Input object
$output Symfony\Component\Console\Output\OutputInterface Output object
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $code = $input->getArgument('email');
        if (($password = $input->getOption('password')) === null) {
            $helper = $this->getHelper('question');
            $question = new Question('Password');
            $question->setHidden(true);
            $password = $helper->ask($input, $output, $question);
        }
        $context = $this->getContainer()->get('aimeos_context')->get(false, 'command');
        $context->setEditor('aimeos:account');
        $localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($context);
        $context->setLocale($localeManager->createItem());
        $user = $this->createCustomerItem($context, $code, $password);
        if ($input->getOption('admin')) {
            $this->addGroup($input, $output, $context, $user, 'admin');
        }
        if ($input->getOption('editor')) {
            $this->addGroup($input, $output, $context, $user, 'editor');
        }
    }