move url generation to I18n entity
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,6 @@ class Folder extends BaseFolder
|
||||
{
|
||||
$this->setPosition($this->getNextPosition());
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user