protected function getAvailableCoupons()
    {
        /** @var CouponManager $couponManager */
        $couponManager = $this->container->get('thelia.coupon.manager');
        $availableCoupons = $couponManager->getAvailableCoupons();
        $cleanedCoupons = [];
        /** @var CouponInterface $availableCoupon */
        foreach ($availableCoupons as $availableCoupon) {
            $condition = [];
            $condition['serviceId'] = $availableCoupon->getServiceId();
            $condition['name'] = $availableCoupon->getName();
            $condition['toolTip'] = $availableCoupon->getToolTip();

            $cleanedCoupons[] = $condition;
        }

        return $cleanedCoupons;
    }
protected function getAvailableCoupons()
    {
        /** @var CouponManager $couponManager */
        $couponManager = $this->container->get('thelia.coupon.manager');
        $availableCoupons = $couponManager->getAvailableCoupons();
        $cleanedCoupons = [];
        /** @var CouponInterface $availableCoupon */
        foreach ($availableCoupons as $availableCoupon) {
            $condition = [];
            $condition['serviceId'] = $availableCoupon->getServiceId();
            $condition['name'] = $availableCoupon->getName();
            $condition['toolTip'] = $availableCoupon->getToolTip();

            $cleanedCoupons[] = $condition;
        }

        return $cleanedCoupons;
    }
protected function getAvailableCoupons ( ) { /** @var CouponManager $couponManager */ $ couponManager = $ this -> container -> get ( 'thelia.coupon.manager' ) ; $ availableCoupons = $ couponManager -> getAvailableCoupons ( ) ; $ cleanedCoupons = [ ] ; /** @var CouponInterface $availableCoupon */ foreach ( $ availableCoupons as $ availableCoupon ) { $ condition = [ ] ; $ condition [ 'serviceId' ] = $ availableCoupon -> getServiceId ( ) ; $ condition [ 'name' ] = $ availableCoupon -> getName ( ) ; $ condition [ 'toolTip' ] = $ availableCoupon -> getToolTip ( ) ; $ cleanedCoupons [ ] = $ condition ; } return $ cleanedCoupons ; }
Get all available coupons

@return array
Get all available coupons