Methods summary
public
|
#
__construct( array $options )
Init
Parameters
- $options
An array of key/value pairs representing any custom values, including:
- dateFormat The date format to use
- dateTimeFormat The datetime format to use
|
public
Blesta\Core\Pricing\MetaItem\MetaItemPrice
|
#
metaItemPrice( float $amount, integer $qty, string $key = null )
Creates an instance of the MetaItemPrice
Creates an instance of the MetaItemPrice
Parameters
- $amount
- The unit price
- $qty
- The quantity of unit price
- $key
- A unique identifier (optional, default null)
Returns
|
public
Blesta\Core\Pricing\MetaItem\MetaDiscountPrice
|
#
metaDiscountPrice( float $amount, string $type )
Creates an instance of the MetaDiscountPrice
Creates an instance of the MetaDiscountPrice
Parameters
- $amount
- The positive amount to discount
- $type
The type of discount the $amount represents. One of:
- percent The $amount represents a percentage discount (NOT already divided by 100)
- amount The $amount represents an amount discount
Returns
Throws
|
public
Blesta\Core\Pricing\MetaItem\MetaTaxPrice
|
#
metaTaxPrice( float $amount, string $type )
Creates an instance of the MetaTaxPrice
Creates an instance of the MetaTaxPrice
Parameters
- $amount
- The positive tax amount as a percentage
- $type
The type of tax the $rate represents. One of:
- inclusive Prices include tax
- exclusive Prices do not include tax
Returns
Throws
|
public
Blesta\Core\Pricing\ItemComparator\ItemComparator
|
#
itemComparator( callable $priceCallback, callable $descriptionCallback )
Creates an instance of the ItemComparator
Creates an instance of the ItemComparator
Parameters
- $priceCallback
The pricing callback that accepts four
arguments for the old and new price, and the old and new ItemPrice
meta data (each a Blesta\Items\Item\ItemCollection), and returns a float
- $descriptionCallback
The description callback that
accepts two arguments for the old and new ItemPrice meta data (each
a Blesta\Items\Item\ItemCollection or null), and returns a string
Returns
|
public
Blesta\Core\Pricing\Modifier\Type\Discount\Coupon
|
#
coupon( Blesta\Items\Item\ItemInterface $coupon, string $date )
Creates an instance of a Coupon
Creates an instance of a Coupon
Parameters
- $coupon
- A coupon item
- $date
- A date
Returns
|
public
Blesta\Core\Pricing\Modifier\Type\Proration\Proration
|
#
proration( )
Creates an instance of the Proration modifier
Creates an instance of the Proration modifier
Returns
|
public
Blesta\Core\Pricing\Modifier\Type\Description\Description
|
#
description( )
Creates an instance of the Description modifier
Creates an instance of the Description modifier
Returns
|
public
Blesta\Core\Pricing\Modifier\Type\Price\ArrayMerge
|
#
arrayMerge( )
Creates an instance of the ArrayMerge modifier
Creates an instance of the ArrayMerge modifier
Returns
|
public
Minphp\Date\Date
|
#
date( )
Creates an instance of the Minphp\Date\Date
Creates an instance of the Minphp\Date\Date
Returns
Minphp\Date\Date
|