Neos\Neos\Command\DomainCommandController::deactivateCommand PHP Method

deactivateCommand() public method

Deactivate a domain record by hostname
public deactivateCommand ( string $hostname ) : void
$hostname string 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.');
    }