Refactor removing Manager notion

This commit is contained in:
gmorel
2013-11-23 20:18:04 +01:00
parent 8ce1030178
commit 90b5fbde05
34 changed files with 442 additions and 411 deletions

View File

@@ -39,7 +39,7 @@ use Thelia\Model\Coupon;
*/
class CouponCreateOrUpdateEvent extends ActionEvent
{
/** @var ConditionCollection Array of ConditionManagerInterface */
/** @var ConditionCollection Array of ConditionInterface */
protected $conditions = null;
/** @var string Coupon code (ex: XMAS) */
@@ -280,7 +280,7 @@ class CouponCreateOrUpdateEvent extends ActionEvent
/**
* Get Conditions
*
* @return null|ConditionCollection Array of ConditionManagerInterface
* @return null|ConditionCollection Array of ConditionInterface
*/
public function getConditions()
{
@@ -290,7 +290,7 @@ class CouponCreateOrUpdateEvent extends ActionEvent
/**
* Set Conditions
*
* @param ConditionCollection $conditions Array of ConditionManagerInterface
* @param ConditionCollection $conditions Array of ConditionInterface
*
* @return $this
*/

View File

@@ -26,7 +26,7 @@ namespace Thelia\Core\Template\Loop;
use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\Util\PropelModelPager;
use Thelia\Condition\ConditionFactory;
use Thelia\Condition\ConditionManagerInterface;
use Thelia\Condition\ConditionInterface;
use Thelia\Core\HttpFoundation\Request;
use Thelia\Core\Template\Element\BaseI18nLoop;
use Thelia\Core\Template\Element\LoopResult;
@@ -125,7 +125,7 @@ class Coupon extends BaseI18nLoop implements PropelSearchLoopInterface
$daysLeftBeforeExpiration = floor($datediff/(60*60*24));
$cleanedConditions = array();
/** @var ConditionManagerInterface $condition */
/** @var ConditionInterface $condition */
foreach ($conditions->getConditions() as $condition) {
$cleanedConditions[] = $condition->getToolTip();
}