/**
  * Delete the template, along with its file
  * @return nothing
  */
 public function delete()
 {
     $file = PerchUtil::file_path(PERCH_TEMPLATE_PATH . '/pages/' . $this->templatePath());
     if (!PERCH_RUNWAY && file_exists($file)) {
         unlink($file);
     }
     parent::delete();
 }
 public function delete()
 {
     $Items = new PerchContent_Items();
     $Items->delete_for_region($this->id());
     $r = parent::delete();
     $Perch = Perch::fetch();
     $Perch->event('region.delete', $this);
     return $r;
 }
 public function delete()
 {
     $Categories = new PerchCategories_Categories();
     $categories = $Categories->get_by('setID', $this->id());
     if (PerchUtil::count($categories)) {
         foreach ($categories as $Category) {
             $Category->delete();
         }
     }
     return parent::delete();
 }
예제 #4
0
 public function delete()
 {
     if ($this->clean_resources && !$this->resourceInLibrary()) {
         $Perch = Perch::fetch();
         $bucket = $Perch->get_resource_bucket($this->resourceBucket());
         $file_path = PerchUtil::file_path($bucket['file_path'] . '/' . $this->resourceFile());
         if (file_exists($file_path) && !is_dir($file_path)) {
             unlink($file_path);
             PerchUtil::debug('Deleting resource: ' . $file_path);
         }
     }
     return parent::delete();
 }
 /**
  * Delete the page, along with its file
  * @return nothing
  */
 public function delete()
 {
     $Pages = new PerchContent_Pages();
     $site_path = $Pages->find_site_path();
     $file = PerchUtil::file_path($site_path . '/' . $this->pagePath());
     if (!PERCH_RUNWAY && !$this->pageNavOnly() && file_exists($file)) {
         if (defined('PERCH_DONT_DELETE_FILES') && PERCH_DONT_DELETE_FILES == true) {
             // don't delete files!
         } else {
             unlink($file);
         }
     }
     return parent::delete();
 }