WIP : Coupon event dispatcher + action

This commit is contained in:
gmorel
2013-09-12 17:21:49 +02:00
parent 6d914c5676
commit 2e7e31285e
14 changed files with 145 additions and 62 deletions

View File

@@ -27,6 +27,7 @@ use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\Translation\Translator;
use Symfony\Component\Translation\TranslatorInterface;
use Thelia\Constraint\ConstraintValidator;
use Thelia\Core\HttpFoundation\Request;
use Thelia\Core\Security\SecurityContext;
use Thelia\Coupon\Type\CouponInterface;
@@ -155,6 +156,11 @@ class CouponBaseAdapter implements CouponAdapterInterface
*/
public function getCurrentCoupons()
{
// @todo implement
// $consumedCoupons = $this->getRequest()->getSession()->getConsumedCoupons();
// @todo convert coupon code to coupon Interface
$couponFactory = $this->container->get('thelia.coupon.factory');
// @todo get from cart
@@ -250,4 +256,14 @@ class CouponBaseAdapter implements CouponAdapterInterface
{
return $this->container->get('request');
}
/**
* Return Constraint Validator
*
* @return ConstraintValidator
*/
public function getConstraintValidator()
{
return $this->container->get('thelia.constraint.validator');
}
}