Merge branch 'master' of github.com:thelia/thelia

Conflicts:
	core/lib/Thelia/Config/Resources/routing/front.xml
This commit is contained in:
Manuel Raynaud
2013-09-04 17:57:41 +02:00
162 changed files with 10966 additions and 10282 deletions

View File

@@ -13,6 +13,8 @@ class Category extends BaseCategory
{
use \Thelia\Model\Tools\ModelEventDispatcherTrait;
use \Thelia\Model\Tools\PositionManagementTrait;
/**
* @return int number of child for the current category
*/
@@ -23,7 +25,7 @@ class Category extends BaseCategory
public function getUrl($locale)
{
return URL::init()->retrieve('category', $this->getId(), $locale);
return URL::getInstance()->retrieve('category', $this->getId(), $locale);
}
/**
@@ -46,18 +48,6 @@ class Category extends BaseCategory
$this->save();
}
public function getNextPosition($parent) {
$last = CategoryQuery::create()
->filterByParent($parent)
->orderByPosition(Criteria::DESC)
->limit(1)
->findOne()
;
return $last != null ? $last->getPosition() + 1 : 1;
}
/**
*
* count all products for current category and sub categories

View File

@@ -9,6 +9,6 @@ class Content extends BaseContent
{
public function getUrl($locale)
{
return URL::init()->retrieve('content', $this->getId(), $locale);
return URL::getInstance()->retrieve('content', $this->getId(), $locale);
}
}

View File

@@ -11,6 +11,8 @@ class Currency extends BaseCurrency {
use \Thelia\Model\Tools\ModelEventDispatcherTrait;
use \Thelia\Model\Tools\PositionManagementTrait;
/**
* {@inheritDoc}
*/

View File

@@ -17,7 +17,7 @@ class Folder extends BaseFolder
public function getUrl($locale)
{
return URL::init()->retrieve('folder', $this->getId(), $locale);
return URL::getInstance()->retrieve('folder', $this->getId(), $locale);
}
/**

View File

@@ -9,6 +9,6 @@ class Product extends BaseProduct
{
public function getUrl($locale)
{
return URL::init()->retrieve('product', $this->getId(), $locale);
return URL::getInstance()->retrieve('product', $this->getId(), $locale);
}
}