Skip to content

DeliveryAddressCheckoutFormService

DeliveryAddressCheckoutFormService (Siso\Bundle\CheckoutBundle\Service\DeliveryAddressCheckoutFormService) implements the logic for the CheckoutDeliveryAddress form. This service is assigned to the CheckoutDeliveryAddress form in the configuration.

This service implements both CheckoutFormServiceInterface and CheckoutAddressFormServiceInterface.

The service ID is siso_checkout.checkout_form.delivery_address.

Usage

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
/** @var BasketService $basketService */
$basketService = $this->container->get('silver_basket.basket_service');
$basket = $basketService->getBasket($request);
$invoice = $basket->getInvoiceParty();

/** @var CheckoutAddressFormServiceInterface $formService */
$formService = $this->container->get('siso_checkout.checkout_form.delivery_address');

/** @var CheckoutDeliveryAddress $delivery */
$delivery = $formService->convertPartyToFormData($invoice);
Read the Docs