Platformsh\Cli\Command\Domain\DomainDeleteCommand::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);
        $name = $input->getArgument('name');
        $project = $this->getSelectedProject();
        $domain = $project->getDomain($name);
        if (!$domain) {
            $this->stdErr->writeln("Domain not found: <error>{$name}</error>");
            return 1;
        }
        if (!$this->getHelper('question')->confirm("Are you sure you want to delete the domain <info>{$name}</info>?")) {
            return 1;
        }
        $result = $domain->delete();
        $this->stdErr->writeln("The domain <info>{$name}</info> has been deleted.");
        if (!$input->getOption('no-wait')) {
            ActivityUtil::waitMultiple($result->getActivities(), $this->stdErr, $project);
        }
        return 0;
    }
DomainDeleteCommand