WIP
- Coupon controller
This commit is contained in:
@@ -31,6 +31,7 @@ use Thelia\Coupon\CouponRuleCollection;
|
|||||||
use Thelia\Form\CouponCreationForm;
|
use Thelia\Form\CouponCreationForm;
|
||||||
use Thelia\Form\Exception\FormValidationException;
|
use Thelia\Form\Exception\FormValidationException;
|
||||||
use Thelia\Model\Coupon;
|
use Thelia\Model\Coupon;
|
||||||
|
use Thelia\Model\CouponQuery;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by JetBrains PhpStorm.
|
* Created by JetBrains PhpStorm.
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class Coupon extends BaseCoupon
|
|||||||
*
|
*
|
||||||
* @return \Thelia\Model\Coupon The current object (for fluent API support)
|
* @return \Thelia\Model\Coupon The current object (for fluent API support)
|
||||||
*/
|
*/
|
||||||
public function setSerializedRules(CouponRuleCollection $rules)
|
public function setRules(CouponRuleCollection $rules)
|
||||||
{
|
{
|
||||||
if ($rules !== null) {
|
if ($rules !== null) {
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ class Coupon extends BaseCoupon
|
|||||||
*
|
*
|
||||||
* @return CouponRuleCollection Rules ready to be processed
|
* @return CouponRuleCollection Rules ready to be processed
|
||||||
*/
|
*/
|
||||||
public function getSerializedRules()
|
public function getRules()
|
||||||
{
|
{
|
||||||
return unserialize(base64_decode($this->serialized_rules));
|
return unserialize(base64_decode($this->serialized_rules));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user