/**
  * @param FormEvent $event
  */
 public function submit(FormEvent $event)
 {
     /* @var $data NodeInterface */
     $data = $event->getData();
     if (NodeInterface::THEME_DEFAULT === $data->getTheme()) {
         $siteId = $data->getSiteId();
         /* @var $site \OpenOrchestra\ModelInterface\Model\SiteInterface */
         $site = $this->siteRepository->findOneBySiteId($siteId);
         $theme = $site->getTheme()->getName();
         $data->setTheme($theme);
         $data->setDefaultSiteTheme(true);
     } else {
         $data->setDefaultSiteTheme(false);
     }
     $event->setData($data);
 }
 /**
  * @param int    $count
  * @param string $siteId
  */
 protected function assertSiteCount($count, $siteId)
 {
     $sites = $this->siteRepository->findBy(array('siteId' => $siteId));
     $this->assertCount($count, $sites);
 }