SilverShop\Discounts\Extensions\Constraints\ItemDiscountConstraint
Discount constraint that restricts to specific items.
Synopsis
class ItemDiscountConstraint
extends DiscountConstraint
{
- // Inherited members from DiscountConstraint
- protected $order;
- protected $context;
- protected $message;
- protected $messagetype;
- // methods
- public static bool match()
- public abstract boolean itemMatchesCriteria()
- public boolean itemsInCart()
- // Inherited methods from DiscountConstraint
- public void setOrder()
- public void setContext()
- public DataList filter()
- public abstract boolean check()
- protected void message()
- protected void error()
- public void getMessage()
- public void getMessageType()
Hierarchy
Members
protected
- $context
- $message
- $messagetype
- $order
Methods
public
- itemMatchesCriteria() — Returns true if the given item sits within this constraint.
- itemsInCart() — Check if at least one item in cart matches this criteria.
- match() — Checks that an item can be discounted for configured constraints.
Inherited from SilverShop\Discounts\Extensions\Constraints\DiscountConstraint
protected
public
- check() — Check if the current set order falls within this constraint.
- filter() — Filter a list of discounts according to this constraint.
- getMessage()
- getMessageType()
- setContext()
- setOrder()