public function deleteWebsite(Website $website)
 {
     $websiteUploadFolder = $this->webDir . DIRECTORY_SEPARATOR . $website->getOptions()->getUploadDir();
     $fs = new FileSystem();
     $fs->remove($websiteUploadFolder);
     $this->om->remove($website);
     $this->om->flush();
 }
Beispiel #2
0
 /**
  * @param Website $website
  * @param string  $childType
  * @param string  $action
  * @param array   $details
  *
  * @return Controller
  */
 protected function dispatchChildEvent(Website $website, $childType, $action, $details = array())
 {
     $event = new LogResourceChildUpdateEvent($website->getResourceNode(), $childType, $action, $details);
     return $this->dispatch($event);
 }
Beispiel #3
0
 public function deleteWebsiteTestsFolder(Website $website, $webDir)
 {
     $websiteUploadFolder = $webDir . DIRECTORY_SEPARATOR . $website->getOptions()->getUploadDir();
     $fs = new FileSystem();
     $fs->remove($websiteUploadFolder);
 }
 public function setHomepage(Website $website, WebsitePage $page)
 {
     $website->setHomePage($page);
     $page->setIsHomepage(true);
     $this->objectManager->persist($page);
     $this->objectManager->persist($website);
     $this->objectManager->flush();
 }