Neos\Neos\Domain\Model\Domain::setActive PHP Method

setActive() public method

Sets if the domain is active
public setActive ( boolean $active ) : void
$active boolean If the domain is active
return void
    public function setActive($active)
    {
        $this->active = $active;
    }

Usage Example

 /**
  * Deactivates a domain
  *
  * @param Domain $domain Domain to deactivate
  * @Flow\IgnoreValidation("$domain")
  * @return void
  */
 public function deactivateDomainAction(Domain $domain)
 {
     $domain->setActive(false);
     $this->domainRepository->update($domain);
     $this->addFlashMessage('The domain "%s" has been deactivated.', 'Domain deactivated', Message::SEVERITY_OK, array(htmlspecialchars($domain)), 1412373425);
     $this->unsetLastVisitedNodeAndRedirect('edit', null, null, array('site' => $domain->getSite()));
 }