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;
}