Interfaces¶

Danger

We’re sorry but this documentation section is outdated. Please have that in mind when trying to use it. You can help us making documentation up to date via Sylius Github. Thank you!

Model Interfaces¶

PromotionSubjectInterface¶

To characterize an object with attributes and options from a promotion, the object class needs to implement the PromotionSubjectInterface.

Note

You will find more information about this interface in Sylius API PromotionSubjectInterface.

PromotionInterface¶

This interface should be implemented by models representing a Promotion.

Note

This interface extends the CodeAwareInterface and TimestampableInterface.

You will find more information about this interface in Sylius API PromotionInterface.

PromotionActionInterface¶

This interface should be implemented by models representing an PromotionAction.

An PromotionActionInterface has two defined types by default:

Related constant Type
TYPE_FIXED_DISCOUNT fixed_discount
TYPE_PERCENTAGE_DISCOUNT percentage_discount

Note

You will find more information about this interface in Sylius API PromotionActionInterface.

CouponInterface¶

This interface should be implemented by models representing a Coupon.

Note

This interface extends the CodeAwareInterface and the TimestampableInterface.

You will find more information about this interface in Sylius API CouponInterface.

PromotionRuleInterface¶

This interface should be implemented by models representing a PromotionRule.

A PromotionRuleInterface has two defined types by default:

Related constant Type
TYPE_ITEM_TOTAL item_total
TYPE_ITEM_COUNT item_count

Note

You will find more information about this interface in Sylius API PromotionRuleInterface.

CountablePromotionSubjectInterface¶

To be able to count the object’s promotion subjects, the object class needs to implement the CountablePromotionSubjectInterface.

Note

This interface extends the PromotionSubjectInterface.

You will find more information about this interface in Sylius API CountablePromotionSubjectInterface.

PromotionCouponAwarePromotionSubjectInterface¶

To make the object able to get its associated coupon, the object class needs to implement the PromotionCouponAwarePromotionSubjectInterface.

Note

This interface extends the PromotionSubjectInterface.

You will find more information about this interface in Sylius API PromotionCouponAwarePromotionSubjectInterface.

PromotionCouponsAwareSubjectInterface¶

To make the object able to get its associated coupons collection, the object class needs to implement the PromotionCouponsAwareSubjectInterface.

Note

This interface extends the PromotionSubjectInterface.

You will find more information about this interface in Sylius API PromotionCouponsAwareSubjectInterface.

Services Interfaces¶

PromotionEligibilityCheckerInterface¶

Services responsible for checking the promotions eligibility on the promotion subjects should implement this interface.

Note

You will find more information about this interface in Sylius API PromotionEligibilityCheckerInterface.

RuleCheckerInterface¶

Services responsible for checking the rules eligibility should implement this interface.

Note

You will find more information about this interface in Sylius API RuleCheckerInterface.

PromotionApplicatorInterface¶

Service responsible for applying promotions in your system should implement this interface.

Note

You will find more information about this interface in Sylius API PromotionApplicatorInterface.

PromotionProcessorInterface¶

Service responsible for checking all rules and applying configured actions if rules are eligible in your system should implement this interface.

Note

You will find more information about this interface in Sylius API PromotionProcessorInterface.

PromotionRepositoryInterface¶

In order to be able to find active promotions in your system you should create a repository class which implements this interface.

Note

This interface extends the RepositoryInterface.

For more detailed information about this interface go to Sylius API PromotionRepositoryInterface.

PromotionCouponGeneratorInterface¶

In order to automate the process of coupon generation your system needs to have a service that will implement this interface.

Note

For more detailed information about this interface go to Sylius API PromotionCouponGeneratorInterface.

PromotionActionCommandInterface¶

This interface should be implemented by services that execute actions on the promotion subjects.

Note

You will find more information about this interface in Sylius API PromotionActionCommandInterface.