Refactor removing Manager notion
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user