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