Documentation

ShippingMethodInterface

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>

shipping_cost additional_data - mixed

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

getConfigurationForm()

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

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