Form/Front/CartFormBuilder.php
private function addShippingOptions(Order $order, FormInterface $form)
    {
        if ($order->getShippingMethod() instanceof ShippingMethod) {
            $provider = $this->getOptionsProvider($order->getShippingMethod());
            if ($provider instanceof ShippingMethodOptionsProviderInterface) {
                $form->addChild($this->getElement('select', [
                    'name'    => 'shippingMethodOption',
                    'label'   => 'order.label.shipping_method',
                    'options' => $provider->getShippingOptions(),
                ]));
            }
        }
    }
private function addShippingOptions(Order $order, FormInterface $form)
    {
        if ($order->getShippingMethod() instanceof ShippingMethod) {
            $provider = $this->getOptionsProvider($order->getShippingMethod());
            if ($provider instanceof ShippingMethodOptionsProviderInterface) {
                $form->addChild($this->getElement('select', [
                    'name'    => 'shippingMethodOption',
                    'label'   => 'order.label.shipping_method',
                    'options' => $provider->getShippingOptions(),
                ]));
            }
        }
    }
private function addShippingOptions ( Order $ order , FormInterface $ form ) { if ( $ order -> getShippingMethod ( ) instanceof ShippingMethod ) { $ provider = $ this -> getOptionsProvider ( $ order -> getShippingMethod ( ) ) ; if ( $ provider instanceof ShippingMethodOptionsProviderInterface ) { $ form -> addChild ( $ this -> getElement ( 'select' , [ 'name' => 'shippingMethodOption' , 'label' => 'order.label.shipping_method' , 'options' => $ provider -> getShippingOptions ( ) , ] ) ) ; } } }
Adds shipping options if available for order's shipping method

@param Order         $order
@param FormInterface $form
Adds shipping options if available for order s shipping method