move url generation to I18n entity

This commit is contained in:
Manuel Raynaud
2013-09-17 20:45:29 +02:00
parent c659bc0e66
commit 5a64654ce5
3 changed files with 12 additions and 3 deletions

View File

@@ -2,8 +2,13 @@
namespace Thelia\Model;
use Propel\Runtime\Connection\ConnectionInterface;
use Thelia\Model\Base\CategoryI18n as BaseCategoryI18n;
class CategoryI18n extends BaseCategoryI18n {
public function postInsert(ConnectionInterface $con = null)
{
$category = $this->getCategory();
$category->generateRewrittenUrl($this->getLocale());
}
}

View File

@@ -2,8 +2,13 @@
namespace Thelia\Model;
use Propel\Runtime\Connection\ConnectionInterface;
use Thelia\Model\Base\ContentI18n as BaseContentI18n;
class ContentI18n extends BaseContentI18n {
public function postInsert(ConnectionInterface $con = null)
{
$content = $this->getContent();
$content->generateRewrittenUrl($this->getLocale());
}
}

View File

@@ -67,7 +67,6 @@ class Folder extends BaseFolder
{
$this->setPosition($this->getNextPosition());
return true;
}
}