@@ 987-1012 (lines=26) @@ | ||
984 | * @return \Symfony\Component\Form\Form |
|
985 | * @deprecated since 3.0, to be removed in 3.1 |
|
986 | */ |
|
987 | public function getShippingForm(Order $Order) |
|
988 | { |
|
989 | $message = $Order->getMessage(); |
|
990 | ||
991 | $deliveries = $this->getDeliveriesOrder($Order); |
|
992 | ||
993 | // 配送業者の支払方法を取得 |
|
994 | $payments = $this->getFormPayments($deliveries, $Order); |
|
995 | ||
996 | $builder = $this->app['form.factory']->createBuilder('shopping', null, array( |
|
997 | 'payments' => $payments, |
|
998 | 'payment' => $Order->getPayment(), |
|
999 | 'message' => $message, |
|
1000 | )); |
|
1001 | ||
1002 | $builder |
|
1003 | ->add('shippings', 'collection', array( |
|
1004 | 'type' => 'shipping_item', |
|
1005 | 'data' => $Order->getShippings(), |
|
1006 | )); |
|
1007 | ||
1008 | $form = $builder->getForm(); |
|
1009 | ||
1010 | return $form; |
|
1011 | ||
1012 | } |
|
1013 | ||
1014 | /** |
|
1015 | * お届け先ごとにFormBuilderを作成 |
|
@@ 1020-1043 (lines=24) @@ | ||
1017 | * @param Order $Order |
|
1018 | * @return \Symfony\Component\Form\FormBuilderInterface |
|
1019 | */ |
|
1020 | public function getShippingFormBuilder(Order $Order) |
|
1021 | { |
|
1022 | $message = $Order->getMessage(); |
|
1023 | ||
1024 | $deliveries = $this->getDeliveriesOrder($Order); |
|
1025 | ||
1026 | // 配送業者の支払方法を取得 |
|
1027 | $payments = $this->getFormPayments($deliveries, $Order); |
|
1028 | ||
1029 | $builder = $this->app['form.factory']->createBuilder('shopping', null, array( |
|
1030 | 'payments' => $payments, |
|
1031 | 'payment' => $Order->getPayment(), |
|
1032 | 'message' => $message, |
|
1033 | )); |
|
1034 | ||
1035 | $builder |
|
1036 | ->add('shippings', 'collection', array( |
|
1037 | 'type' => 'shipping_item', |
|
1038 | 'data' => $Order->getShippings(), |
|
1039 | )); |
|
1040 | ||
1041 | return $builder; |
|
1042 | ||
1043 | } |
|
1044 | ||
1045 | ||
1046 | /** |