Platformsh\Cli\Command\Integration\IntegrationDeleteCommand::execute PHP Method

execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->validateInput($input);
        $id = $input->getArgument('id');
        $integration = $this->getSelectedProject()->getIntegration($id);
        if (!$integration) {
            $this->stdErr->writeln("Integration not found: <error>{$id}</error>");
            return 1;
        }
        $type = $integration->getProperty('type');
        $confirmText = "Delete the integration <info>{$id}</info> (type: {$type})?";
        if (!$this->getHelper('question')->confirm($confirmText)) {
            return 1;
        }
        $result = $integration->delete();
        $this->stdErr->writeln("Deleted integration <info>{$id}</info>");
        if (!$input->getOption('no-wait')) {
            ActivityUtil::waitMultiple($result->getActivities(), $this->stdErr, $this->getSelectedProject());
        }
        return 0;
    }
IntegrationDeleteCommand