public function onAfterDelete()
 {
     parent::onAfterDelete();
     // an actual delete vs draft delete
     if (!$this->owner->hasExtension('Versioned')) {
         if ($this->owner->MasterNode == SiteConfig::current_site_config()->SystemID) {
             SyncroDelete::record_delete($this->owner);
         }
     }
 }
 /**
  *	Determine whether link mappings need to be updated when removing this page.
  */
 public function onAfterDelete()
 {
     parent::onAfterDelete();
     // Determine whether this page has been completely removed.
     if (Config::inst()->get('MisdirectionRequestFilter', 'replace_default') && !$this->owner->isPublished() && $this->owner->getIsDeletedFromStage()) {
         // Convert any link mappings that are directly associated with this page.
         $mappings = LinkMapping::get()->filter(array('RedirectType' => 'Page', 'RedirectPageID' => $this->owner->ID));
         foreach ($mappings as $mapping) {
             $mapping->RedirectType = 'Link';
             $mapping->RedirectLink = Director::makeRelative($this->owner->Link() === Director::baseURL() ? Controller::join_links(Director::baseURL(), 'home/') : $this->owner->Link());
             $mapping->write();
         }
     }
 }
 /**
  * Removes the object from the search index after it has been deleted.
  */
 function onAfterDelete()
 {
     ZendSearchLuceneWrapper::delete($this->owner);
     parent::onAfterDelete();
 }
 /**
  *	Update the fusion tag to remove this tag type.
  */
 public function onAfterDelete()
 {
     parent::onAfterDelete();
     $fusion = FusionTag::get()->byID($this->owner->FusionTagID);
     $types = unserialize($fusion->TagTypes);
     unset($types[$this->owner->ClassName]);
     $fusion->TagTypes = !empty($types) ? serialize($types) : null;
     $fusion->write();
 }
Exemplo n.º 5
0
 /**
  * Delete the attributed shopping cart if existant.
  *
  * @return void
  *
  * @author Sascha Koehler <*****@*****.**>
  * @since 10.10.2011
  */
 public function onAfterDelete()
 {
     parent::onAfterDelete();
     if ($this->owner->SilvercartShoppingCartID !== null) {
         $cart = DataObject::get_by_id('SilvercartShoppingCart', $this->owner->SilvercartShoppingCartID);
         if ($cart) {
             $cart->delete();
         }
     }
 }
 function onAfterDelete()
 {
     parent::onAfterDelete();
     $this->cleaningUpVariationData();
 }