SilverShop\Checkout\Component\AddressBook
Adds the ability to use the member's address book for choosing addresses
Synopsis
class AddressBook
extends Address
implements
i18nEntityProvider
{
- // members
- private static string $composite_field_tag = 'div';
- protected boolean $addtoaddressbook = true;
- // Inherited members from Address
- protected boolean $formfielddescriptions;
- protected $addresstype;
- protected boolean $addtoaddressbook;
- // Inherited members from CheckoutComponent
- protected array $requiredfields;
- protected array $dependson;
- // methods
- public void getFormFields()
- public FieldList|null getExistingAddressFields()
- public array getRequiredFields()
- public void validateData()
- public void setData()
- public array provideI18nEntities()
- // Inherited methods from Address
- public void getFormFields()
- public void getRequiredFields()
- public void validateData()
- public void getData()
- public void setData()
- public void setShowFormFieldDescriptions()
- public void setAddToAddressBook()
- public Address getAddress()
- // Inherited methods from CheckoutComponent
- 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
Members
private
- $composite_field_tag
—
string
The composite field tag to use
protected
- $addresstype
- $addtoaddressbook
- $addtoaddressbook
- $dependson
- $formfielddescriptions
- $requiredfields
Methods
public
- getExistingAddressFields() — Allow choosing from an existing address
- getFormFields()
- getRequiredFields() — We don't know at the front end which fields are required so we defer to validateData
- provideI18nEntities() — Provide translatable entities for this class
- setData() — Create a new address if the existing address has changed, or is not yet created.
- validateData()
Inherited from SilverShop\Checkout\Component\Address
public
- getAddress()
- getData()
- getFormFields()
- getRequiredFields()
- setAddToAddressBook() — Add new addresses to the address book.
- setData() — Create a new address if the existing address has changed, or is not yet created.
- setShowFormFieldDescriptions() — Enable adding form field descriptions
- validateData()
Inherited from SilverShop\Checkout\Component\CheckoutComponent
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?