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