Neos\Neos\Command\DomainCommandController::activateCommand PHP Method

activateCommand() public method

Activate a domain record by hostname
public activateCommand ( string $hostname ) : void
$hostname string The hostname to activate
return void
    public function activateCommand($hostname)
    {
        $domain = $this->domainRepository->findOneByHostname($hostname);
        if (!$domain instanceof Domain) {
            $this->outputLine('<error>Domain not found.</error>');
            $this->quit(1);
        }
        $domain->setActive(true);
        $this->domainRepository->update($domain);
        $this->outputLine('Domain entry activated.');
    }