SilverShop\Checkout\Component\CheckoutComponent
CheckoutComponent
A modularised piece of checkout functionality.
A checkout component will:
- provide form fields
- validate entered data
- save data from given form fields
Synopsis
class CheckoutComponent
{
- // members
- protected array $requiredfields = ;
- protected array $dependson = ;
- // methods
- public abstract FieldList getFormFields()
- public abstract boolean validateData()
- public abstract array getData()
- public abstract Order setData()
- public array getRequiredFields()
- public array dependsOn()
- public string name()
- public bool providesPaymentData()
Hierarchy
Uses
- SilverStripe\Core\Injector\Injectable
Members
protected
- $dependson
- $requiredfields
Methods
public
- dependsOn()
- getData() — Get required data out of the model.
- getFormFields() — Get form fields for manipulating the current order, according to the responsibility of this component.
- getRequiredFields() — Get the data fields that are required for the component.
- name()
- providesPaymentData() — Whether or not this component provides the payment data that should be passed to the payment gateway
- setData() — Set the model data for this component.
- validateData() — Is this data valid for saving into an order?