Documentation

FlatRate extends BaseShippingMethod
in package

Table of Contents

Methods

calculateShipping()  : array<string|int, mixed>
return array must contain the following properties
evaluateShippingCosts()  : float
getCode()  : string
getConfigurationForm()  : Form
getName()  : string
getShippingFormFieldset()  : FieldsContainerInterface
isActive()  : bool
isApplicable()  : bool
showEvenIfNotCheapest()  : bool
this function is used to determine if applicable shipping method must be shown even if another which is cheaper is found

Methods

calculateShipping()

return array must contain the following properties

public calculateShipping(FormValues|null $values, Cart $cart) : array<string|int, mixed>
Parameters
$values : FormValues|null
$cart : Cart
Return values
array<string|int, mixed>

evaluateShippingCosts()

public evaluateShippingCosts(Address $shippingAddress, Cart $cart) : float
Parameters
$shippingAddress : Address
$cart : Cart
Return values
float

getCode()

public getCode() : string
Return values
string

getConfigurationForm()

public getConfigurationForm(Form $form, array<string|int, mixed> &$form_state) : Form
Parameters
$form : Form
$form_state : array<string|int, mixed>
Return values
Form

getName()

public getName() : string
Return values
string

getShippingFormFieldset()

public getShippingFormFieldset(Cart $cart, Form $form, array<string|int, mixed> &$form_state) : FieldsContainerInterface
Parameters
$cart : Cart
$form : Form
$form_state : array<string|int, mixed>
Return values
FieldsContainerInterface

showEvenIfNotCheapest()

this function is used to determine if applicable shipping method must be shown even if another which is cheaper is found

public showEvenIfNotCheapest() : bool
Return values
bool

        
On this page

Search results