PHP 인터페이스 Buyable, silvershop-core

파일 보기 프로젝트 열기: burnbright/silverstripe-shop 0 사용 예제들

공개 메소드들

메소드 설명
canPurchase ( Member | null $member = null, integer $quantity = 1 ) : boolean Checks if the buyable can be purchased. If a buyable cannot be purchased then the method should return false
createItem ( integer $quantity = 1, array $filter = [] ) : OrderItem Create a new OrderItem to add to an order.
sellingPrice ( ) : ShopCurrency The price the customer gets this buyable for, with any additional additions or subtractions.

메소드 상세

canPurchase() 공개 메소드

Checks if the buyable can be purchased. If a buyable cannot be purchased then the method should return false
public canPurchase ( Member | null $member = null, integer $quantity = 1 ) : boolean
$member Member | null the Member that wants to purchase the buyable. Defaults to null
$quantity integer the quantity to purchase. Defaults to 1
리턴 boolean true if the buyable can be purchased

createItem() 공개 메소드

Create a new OrderItem to add to an order.
public createItem ( integer $quantity = 1, array $filter = [] ) : OrderItem
$quantity integer
$filter array
리턴 OrderItem new OrderItem object

sellingPrice() 공개 메소드

The price the customer gets this buyable for, with any additional additions or subtractions.
public sellingPrice ( ) : ShopCurrency
리턴 ShopCurrency