This commit is contained in:
Etienne Roudeix
2013-12-06 11:50:29 +01:00
parent d06e0a14cf
commit 926ff410d1
4 changed files with 22 additions and 0 deletions

View File

@@ -115,6 +115,13 @@ class Category extends BaseCategory
*/
public function postDelete(ConnectionInterface $con = null)
{
RewritingUrlQuery::create()
->filterByView($this->getRewrittenUrlViewName())
->filterByViewId($this->getId())
->update(array(
"View" => ConfigQuery::getObsoleteRewrittenUrlView()
));
$this->dispatchEvent(TheliaEvents::AFTER_DELETECATEGORY, new CategoryEvent($this));
}
}

View File

@@ -148,6 +148,13 @@ class Content extends BaseContent
public function postDelete(ConnectionInterface $con = null)
{
RewritingUrlQuery::create()
->filterByView($this->getRewrittenUrlViewName())
->filterByViewId($this->getId())
->update(array(
"View" => ConfigQuery::getObsoleteRewrittenUrlView()
));
$this->dispatchEvent(TheliaEvents::AFTER_DELETECONTENT, new ContentEvent($this));
}
}

View File

@@ -100,6 +100,13 @@ class Folder extends BaseFolder
public function postDelete(ConnectionInterface $con = null)
{
RewritingUrlQuery::create()
->filterByView($this->getRewrittenUrlViewName())
->filterByViewId($this->getId())
->update(array(
"View" => ConfigQuery::getObsoleteRewrittenUrlView()
));
$this->dispatchEvent(TheliaEvents::AFTER_DELETEFOLDER, new FolderEvent($this));
}
}

View File

@@ -269,6 +269,7 @@ class Product extends BaseProduct
->update(array(
"View" => ConfigQuery::getObsoleteRewrittenUrlView()
));
$this->dispatchEvent(TheliaEvents::AFTER_DELETEPRODUCT, new ProductEvent($this));
}
}