setName('zone:unassign')
->setDescription('Add a domain')
->addArgument('domain_id', InputArgument::REQUIRED, 'ZONE_ID')
->setHelp("The %command.name% ");
}
protected function execute(InputInterface $input, OutputInterface $output)
{
parent::execute($input, $output);
$domain = DomainQuery::create()->findOneById((int) $this->getInput()->getArgument('domain_id'));
if (null === $domain) {
$this->getOutput()->writeln('Domain not found.');
return;
}
$domain->setZone(null)->save();
$this->getOutput()->writeln('Domain zone updated.');
}
}