@@ 1028-1053 (lines=26) @@ | ||
1025 | * @return \Symfony\Component\Form\Form |
|
1026 | * @deprecated since 3.0, to be removed in 3.1 |
|
1027 | */ |
|
1028 | public function getShippingForm(Order $Order) |
|
1029 | { |
|
1030 | $message = $Order->getMessage(); |
|
1031 | ||
1032 | $deliveries = $this->getDeliveriesOrder($Order); |
|
1033 | ||
1034 | // 配送業者の支払方法を取得 |
|
1035 | $payments = $this->getFormPayments($deliveries, $Order); |
|
1036 | ||
1037 | $builder = $this->app['form.factory']->createBuilder('shopping', null, array( |
|
1038 | 'payments' => $payments, |
|
1039 | 'payment' => $Order->getPayment(), |
|
1040 | 'message' => $message, |
|
1041 | )); |
|
1042 | ||
1043 | $builder |
|
1044 | ->add('shippings', 'collection', array( |
|
1045 | 'type' => 'shipping_item', |
|
1046 | 'data' => $Order->getShippings(), |
|
1047 | )); |
|
1048 | ||
1049 | $form = $builder->getForm(); |
|
1050 | ||
1051 | return $form; |
|
1052 | ||
1053 | } |
|
1054 | ||
1055 | /** |
|
1056 | * お届け先ごとにFormBuilderを作成 |
|
@@ 1061-1084 (lines=24) @@ | ||
1058 | * @param Order $Order |
|
1059 | * @return \Symfony\Component\Form\FormBuilderInterface |
|
1060 | */ |
|
1061 | public function getShippingFormBuilder(Order $Order) |
|
1062 | { |
|
1063 | $message = $Order->getMessage(); |
|
1064 | ||
1065 | $deliveries = $this->getDeliveriesOrder($Order); |
|
1066 | ||
1067 | // 配送業者の支払方法を取得 |
|
1068 | $payments = $this->getFormPayments($deliveries, $Order); |
|
1069 | ||
1070 | $builder = $this->app['form.factory']->createBuilder('shopping', null, array( |
|
1071 | 'payments' => $payments, |
|
1072 | 'payment' => $Order->getPayment(), |
|
1073 | 'message' => $message, |
|
1074 | )); |
|
1075 | ||
1076 | $builder |
|
1077 | ->add('shippings', 'collection', array( |
|
1078 | 'type' => 'shipping_item', |
|
1079 | 'data' => $Order->getShippings(), |
|
1080 | )); |
|
1081 | ||
1082 | return $builder; |
|
1083 | ||
1084 | } |
|
1085 | ||
1086 | ||
1087 | /** |