From 5701d76c1e4596d0eced880ec464ae17358350f2 Mon Sep 17 00:00:00 2001 From: Franck Allimant Date: Fri, 27 Jun 2014 19:50:20 +0200 Subject: [PATCH] Removed constraints on the "source" parameter --- core/lib/Thelia/Core/Template/Loop/Document.php | 10 +++------- core/lib/Thelia/Core/Template/Loop/Image.php | 10 +++------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/core/lib/Thelia/Core/Template/Loop/Document.php b/core/lib/Thelia/Core/Template/Loop/Document.php index 586a74ab7..5a129afd6 100644 --- a/core/lib/Thelia/Core/Template/Loop/Document.php +++ b/core/lib/Thelia/Core/Template/Loop/Document.php @@ -39,7 +39,7 @@ class Document extends BaseI18nLoop implements PropelSearchLoopInterface protected $timestampable = true; /** - * @var array Possible document sources + * @var array Possible standard document sources */ protected $possible_sources = array('category', 'product', 'folder', 'content', 'brand'); @@ -66,12 +66,8 @@ class Document extends BaseI18nLoop implements PropelSearchLoopInterface Argument::createIntTypeArgument('folder'), Argument::createIntTypeArgument('content'), - new Argument( - 'source', - new TypeCollection( - new EnumType($this->possible_sources) - ) - ), + Argument::createAnyTypeArgument('source'), + Argument::createIntTypeArgument('source_id'), Argument::createBooleanTypeArgument('force_return', true) ); diff --git a/core/lib/Thelia/Core/Template/Loop/Image.php b/core/lib/Thelia/Core/Template/Loop/Image.php index 234ed26de..b77609201 100644 --- a/core/lib/Thelia/Core/Template/Loop/Image.php +++ b/core/lib/Thelia/Core/Template/Loop/Image.php @@ -39,7 +39,7 @@ class Image extends BaseI18nLoop implements PropelSearchLoopInterface protected $timestampable = true; /** - * @var array Possible image sources + * @var array Possible standard image sources */ protected $possible_sources = array('category', 'product', 'folder', 'content', 'module', 'brand'); @@ -80,12 +80,8 @@ class Image extends BaseI18nLoop implements PropelSearchLoopInterface Argument::createIntTypeArgument('folder'), Argument::createIntTypeArgument('content'), - new Argument( - 'source', - new TypeCollection( - new EnumType($this->possible_sources) - ) - ), + Argument::createAnyTypeArgument('source'), + Argument::createIntTypeArgument('source_id'), Argument::createBooleanTypeArgument('force_return', true) );