Skip to content

The EntityForm Interface family

Here is a high-level overview of the interfaces used to build forms.
The intention is to give an overview of the available building blocks for customizations.
The details are covered later.

  • \Hyva\Checkout\Model\Form\EntityFormInterface
    There are two implementations of this interface: EavAttributeShippingAddressForm and EavAttributeBillingAddressForm.
    We do not expect the interfaces to be implemented as part of customizations (even though that would technically be possible).

  • \Hyva\Checkout\Model\Form\EntityFormElementInterface
    A form element is anything in a form: an input, an informational text, a graphic, a separator, or anything else.
    Form elements can be placed in a hierarchy so groups of related elements are rendered together.

  • \Hyva\Checkout\Model\Form\EntityFieldInterface
    In a nutshell, form fields are input elements.
    They inherit from EntityFormElementInterface.

  • \Hyva\Checkout\Model\Form\EntityFormModifierInterface
    Form modifiers are used to register callbacks for form events.
    They are the entry point for most customizations.

  • \Hyva\Checkout\Model\Form\EntityFormElement\RendererInterface
    This is another interface you will probably never implement yourself.
    The default implementation can be used to apply customizations to how elements are rendered.

  • \Hyva\Checkout\Model\Form\EntityFormSaveServiceInterface
    Each entity form has a matching form save service.
    Should you ever implement EntityFormInterface, you will also need to create a matching EntityFormSaveServiceInterface.
    There checkout has a form save service for shipping addresses and one for billing addresses.