From 0a1cc55b63e6058d189c38f82dcee3e79dfaffac Mon Sep 17 00:00:00 2001 From: Benjamin Perche Date: Wed, 16 Jul 2014 12:20:25 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20add=20i18n=20behaviour=20in=20import=20ex?= =?UTF-8?q?port=20category=20loop=20=09modifi=C3=A9:=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20core/lib/Thelia/Core/Template/Loop/ImportExportCategory.p?= =?UTF-8?q?hp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Thelia/Core/Template/Loop/ImportExportCategory.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/lib/Thelia/Core/Template/Loop/ImportExportCategory.php b/core/lib/Thelia/Core/Template/Loop/ImportExportCategory.php index 4bf50ee69..4d2aaf08e 100644 --- a/core/lib/Thelia/Core/Template/Loop/ImportExportCategory.php +++ b/core/lib/Thelia/Core/Template/Loop/ImportExportCategory.php @@ -12,6 +12,8 @@ namespace Thelia\Core\Template\Loop; use Propel\Runtime\ActiveQuery\Criteria; +use Propel\Runtime\ActiveQuery\ModelCriteria; +use Thelia\Core\Template\Element\BaseI18nLoop; use Thelia\Core\Template\Element\BaseLoop; use Thelia\Core\Template\Element\LoopResult; use Thelia\Core\Template\Element\LoopResultRow; @@ -26,7 +28,7 @@ use Thelia\Type\TypeCollection; * @package Thelia\Core\Template\Loop * @author Benjamin Perche */ -abstract class ImportExportCategory extends BaseLoop implements PropelSearchLoopInterface +abstract class ImportExportCategory extends BaseI18nLoop implements PropelSearchLoopInterface { protected $timestampable = true; @@ -42,7 +44,7 @@ abstract class ImportExportCategory extends BaseLoop implements PropelSearchLoop $loopResultRow ->set("ID", $category->getId()) - ->set("TITLE", $category->getTitle()) + ->set("TITLE", $category->getVirtualColumn("i18n_TITLE")) ->set("POSITION", $category->getPosition()) ; @@ -59,8 +61,11 @@ abstract class ImportExportCategory extends BaseLoop implements PropelSearchLoop */ public function buildModelCriteria() { + /** @var ModelCriteria $query */ $query = $this->getQueryModel(); + $this->configureI18nProcessing($query, array('TITLE')); + if (null !== $ids = $this->getId()) { $query->filterById($ids, Criteria::IN); }