/**
  * 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()));
 }
 /**
  * Deactivates a domain
  *
  * @param Domain $domain Domain to deactivate
  * @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($domain->getHostPattern()), 1412373425);
     $this->unsetLastVisitedNodeAndRedirect('edit', NULL, NULL, array('site' => $domain->getSite()));
 }
 /**
  * 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.');
 }