/** * Deactivate a domain record * * @param string $hostPattern The host pattern of the domain to deactivate * @return void */ public function deactivateCommand($hostPattern) { $domain = $this->domainRepository->findOneByHostPattern($hostPattern); if (!$domain instanceof Domain) { $this->outputLine('<error>Domain not found.</error>'); $this->quit(1); } $domain->setActive(false); $this->domainRepository->update($domain); $this->outputLine('Domain deactivated.'); }