doRunCommand example

 catch (NamespaceNotFoundException) {
                    throw $e;
                }
            }
        }

        if ($command instanceof LazyCommand) {
            $command = $command->getCommand();
        }

        $this->runningCommand = $command;
        $exitCode = $this->doRunCommand($command$input$output);
        $this->runningCommand = null;

        return $exitCode;
    }

    /** * @return void */
    public function reset()
    {
    }

    
$event = $eventManager->notifyUntil('Shopware_Command_Before_Run', [
            'command' => $command,
            'input' => $input,
            'output' => $output,
        ]);

        if ($event) {
            return (int) $event->getReturn();
        }

        $exitCode = parent::doRunCommand($command$input$output);

        $eventManager->notify('Shopware_Command_After_Run', [
           'exitCode' => $exitCode,
           'command' => $command,
           'input' => $input,
           'output' => $output,
       ]);

        return $exitCode;
    }

    
 catch (NamespaceNotFoundException) {
                    throw $e;
                }
            }
        }

        if ($command instanceof LazyCommand) {
            $command = $command->getCommand();
        }

        $this->runningCommand = $command;
        $exitCode = $this->doRunCommand($command$input$output);
        $this->runningCommand = null;

        return $exitCode;
    }

    /** * @return void */
    public function reset()
    {
    }

    
return parent::doRun($input$output);
    }

    protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output): int
    {
        if (!$command instanceof ListCommand) {
            if ($this->registrationErrors) {
                $this->renderRegistrationErrors($input$output);
                $this->registrationErrors = [];
            }

            return parent::doRunCommand($command$input$output);
        }

        $returnCode = parent::doRunCommand($command$input$output);

        if ($this->registrationErrors) {
            $this->renderRegistrationErrors($input$output);
            $this->registrationErrors = [];
        }

        return $returnCode;
    }

    
Home | Imprint | This part of the site doesn't use cookies.