@@ -41,28 +41,28 @@ discard block |
||
41 | 41 | public function register(BaseApplication $app) |
42 | 42 | { |
43 | 43 | // Service |
44 | - $app['eccube.service.system'] = $app->share(function () use ($app) { |
|
44 | + $app['eccube.service.system'] = $app->share(function() use ($app) { |
|
45 | 45 | return new \Eccube\Service\SystemService($app); |
46 | 46 | }); |
47 | - $app['view'] = $app->share(function () use ($app) { |
|
47 | + $app['view'] = $app->share(function() use ($app) { |
|
48 | 48 | return $app['twig']; |
49 | 49 | }); |
50 | - $app['eccube.service.cart'] = $app->share(function () use ($app) { |
|
50 | + $app['eccube.service.cart'] = $app->share(function() use ($app) { |
|
51 | 51 | return new \Eccube\Service\CartService($app); |
52 | 52 | }); |
53 | - $app['eccube.service.order'] = $app->share(function () use ($app) { |
|
53 | + $app['eccube.service.order'] = $app->share(function() use ($app) { |
|
54 | 54 | return new \Eccube\Service\OrderService($app); |
55 | 55 | }); |
56 | - $app['eccube.service.tax_rule'] = $app->share(function () use ($app) { |
|
56 | + $app['eccube.service.tax_rule'] = $app->share(function() use ($app) { |
|
57 | 57 | return new \Eccube\Service\TaxRuleService($app['eccube.repository.tax_rule']); |
58 | 58 | }); |
59 | - $app['eccube.service.plugin'] = $app->share(function () use ($app) { |
|
59 | + $app['eccube.service.plugin'] = $app->share(function() use ($app) { |
|
60 | 60 | return new \Eccube\Service\PluginService($app); |
61 | 61 | }); |
62 | - $app['eccube.service.mail'] = $app->share(function () use ($app) { |
|
62 | + $app['eccube.service.mail'] = $app->share(function() use ($app) { |
|
63 | 63 | return new \Eccube\Service\MailService($app); |
64 | 64 | }); |
65 | - $app['eccube.service.csv.export'] = $app->share(function () use ($app) { |
|
65 | + $app['eccube.service.csv.export'] = $app->share(function() use ($app) { |
|
66 | 66 | $csvService = new \Eccube\Service\CsvExportService(); |
67 | 67 | $csvService->setConfig($app['config']); |
68 | 68 | $csvService->setCsvRepository($app['eccube.repository.csv']); |
@@ -73,170 +73,170 @@ discard block |
||
73 | 73 | |
74 | 74 | return $csvService; |
75 | 75 | }); |
76 | - $app['eccube.service.shopping'] = $app->share(function () use ($app) { |
|
76 | + $app['eccube.service.shopping'] = $app->share(function() use ($app) { |
|
77 | 77 | return new \Eccube\Service\ShoppingService($app, $app['eccube.service.cart'], $app['eccube.service.order']); |
78 | 78 | }); |
79 | 79 | |
80 | 80 | // Repository |
81 | - $app['eccube.repository.master.authority'] = $app->share(function () use ($app) { |
|
81 | + $app['eccube.repository.master.authority'] = $app->share(function() use ($app) { |
|
82 | 82 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Authority'); |
83 | 83 | }); |
84 | - $app['eccube.repository.master.tag'] = $app->share(function () use ($app) { |
|
84 | + $app['eccube.repository.master.tag'] = $app->share(function() use ($app) { |
|
85 | 85 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Tag'); |
86 | 86 | }); |
87 | - $app['eccube.repository.master.pref'] = $app->share(function () use ($app) { |
|
87 | + $app['eccube.repository.master.pref'] = $app->share(function() use ($app) { |
|
88 | 88 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Pref'); |
89 | 89 | }); |
90 | - $app['eccube.repository.master.sex'] = $app->share(function () use ($app) { |
|
90 | + $app['eccube.repository.master.sex'] = $app->share(function() use ($app) { |
|
91 | 91 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Sex'); |
92 | 92 | }); |
93 | - $app['eccube.repository.master.disp'] = $app->share(function () use ($app) { |
|
93 | + $app['eccube.repository.master.disp'] = $app->share(function() use ($app) { |
|
94 | 94 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Disp'); |
95 | 95 | }); |
96 | - $app['eccube.repository.master.product_type'] = $app->share(function () use ($app) { |
|
96 | + $app['eccube.repository.master.product_type'] = $app->share(function() use ($app) { |
|
97 | 97 | return $app['orm.em']->getRepository('Eccube\Entity\Master\ProductType'); |
98 | 98 | }); |
99 | - $app['eccube.repository.master.page_max'] = $app->share(function () use ($app) { |
|
99 | + $app['eccube.repository.master.page_max'] = $app->share(function() use ($app) { |
|
100 | 100 | return $app['orm.em']->getRepository('Eccube\Entity\Master\PageMax'); |
101 | 101 | }); |
102 | - $app['eccube.repository.master.order_status'] = $app->share(function () use ($app) { |
|
102 | + $app['eccube.repository.master.order_status'] = $app->share(function() use ($app) { |
|
103 | 103 | return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderStatus'); |
104 | 104 | }); |
105 | - $app['eccube.repository.master.device_type'] = $app->share(function () use ($app) { |
|
105 | + $app['eccube.repository.master.device_type'] = $app->share(function() use ($app) { |
|
106 | 106 | return $app['orm.em']->getRepository('Eccube\Entity\Master\DeviceType'); |
107 | 107 | }); |
108 | - $app['eccube.repository.master.csv_type'] = $app->share(function () use ($app) { |
|
108 | + $app['eccube.repository.master.csv_type'] = $app->share(function() use ($app) { |
|
109 | 109 | return $app['orm.em']->getRepository('Eccube\Entity\Master\CsvType'); |
110 | 110 | }); |
111 | 111 | |
112 | - $app['eccube.repository.delivery'] = $app->share(function () use ($app) { |
|
112 | + $app['eccube.repository.delivery'] = $app->share(function() use ($app) { |
|
113 | 113 | return $app['orm.em']->getRepository('Eccube\Entity\Delivery'); |
114 | 114 | }); |
115 | - $app['eccube.repository.delivery_date'] = $app->share(function () use ($app) { |
|
115 | + $app['eccube.repository.delivery_date'] = $app->share(function() use ($app) { |
|
116 | 116 | return $app['orm.em']->getRepository('Eccube\Entity\DeliveryDate'); |
117 | 117 | }); |
118 | - $app['eccube.repository.delivery_fee'] = $app->share(function () use ($app) { |
|
118 | + $app['eccube.repository.delivery_fee'] = $app->share(function() use ($app) { |
|
119 | 119 | return $app['orm.em']->getRepository('Eccube\Entity\DeliveryFee'); |
120 | 120 | }); |
121 | - $app['eccube.repository.delivery_time'] = $app->share(function () use ($app) { |
|
121 | + $app['eccube.repository.delivery_time'] = $app->share(function() use ($app) { |
|
122 | 122 | return $app['orm.em']->getRepository('Eccube\Entity\DeliveryTime'); |
123 | 123 | }); |
124 | - $app['eccube.repository.payment'] = $app->share(function () use ($app) { |
|
124 | + $app['eccube.repository.payment'] = $app->share(function() use ($app) { |
|
125 | 125 | return $app['orm.em']->getRepository('Eccube\Entity\Payment'); |
126 | 126 | }); |
127 | - $app['eccube.repository.payment_option'] = $app->share(function () use ($app) { |
|
127 | + $app['eccube.repository.payment_option'] = $app->share(function() use ($app) { |
|
128 | 128 | return $app['orm.em']->getRepository('Eccube\Entity\PaymentOption'); |
129 | 129 | }); |
130 | - $app['eccube.repository.category'] = $app->share(function () use ($app) { |
|
130 | + $app['eccube.repository.category'] = $app->share(function() use ($app) { |
|
131 | 131 | return $app['orm.em']->getRepository('Eccube\Entity\Category'); |
132 | 132 | }); |
133 | - $app['eccube.repository.customer'] = $app->share(function () use ($app) { |
|
133 | + $app['eccube.repository.customer'] = $app->share(function() use ($app) { |
|
134 | 134 | return $app['orm.em']->getRepository('Eccube\Entity\Customer'); |
135 | 135 | }); |
136 | - $app['eccube.repository.news'] = $app->share(function () use ($app) { |
|
136 | + $app['eccube.repository.news'] = $app->share(function() use ($app) { |
|
137 | 137 | return $app['orm.em']->getRepository('Eccube\Entity\News'); |
138 | 138 | }); |
139 | - $app['eccube.repository.mail_history'] = $app->share(function () use ($app) { |
|
139 | + $app['eccube.repository.mail_history'] = $app->share(function() use ($app) { |
|
140 | 140 | return $app['orm.em']->getRepository('Eccube\Entity\MailHistory'); |
141 | 141 | }); |
142 | - $app['eccube.repository.member'] = $app->share(function () use ($app) { |
|
142 | + $app['eccube.repository.member'] = $app->share(function() use ($app) { |
|
143 | 143 | $memberRepository = $app['orm.em']->getRepository('Eccube\Entity\Member'); |
144 | 144 | $memberRepository->setEncoderFactorty($app['security.encoder_factory']); |
145 | 145 | return $memberRepository; |
146 | 146 | }); |
147 | - $app['eccube.repository.order'] = $app->share(function () use ($app) { |
|
147 | + $app['eccube.repository.order'] = $app->share(function() use ($app) { |
|
148 | 148 | return $app['orm.em']->getRepository('Eccube\Entity\Order'); |
149 | 149 | }); |
150 | - $app['eccube.repository.product'] = $app->share(function () use ($app) { |
|
150 | + $app['eccube.repository.product'] = $app->share(function() use ($app) { |
|
151 | 151 | $productRepository = $app['orm.em']->getRepository('Eccube\Entity\Product'); |
152 | 152 | return $productRepository; |
153 | 153 | }); |
154 | - $app['eccube.repository.product_image'] = $app->share(function () use ($app) { |
|
154 | + $app['eccube.repository.product_image'] = $app->share(function() use ($app) { |
|
155 | 155 | return $app['orm.em']->getRepository('Eccube\Entity\ProductImage'); |
156 | 156 | }); |
157 | - $app['eccube.repository.product_class'] = $app->share(function () use ($app) { |
|
157 | + $app['eccube.repository.product_class'] = $app->share(function() use ($app) { |
|
158 | 158 | return $app['orm.em']->getRepository('Eccube\Entity\ProductClass'); |
159 | 159 | }); |
160 | - $app['eccube.repository.product_stock'] = $app->share(function () use ($app) { |
|
160 | + $app['eccube.repository.product_stock'] = $app->share(function() use ($app) { |
|
161 | 161 | return $app['orm.em']->getRepository('Eccube\Entity\ProductStock'); |
162 | 162 | }); |
163 | - $app['eccube.repository.class_name'] = $app->share(function () use ($app) { |
|
163 | + $app['eccube.repository.class_name'] = $app->share(function() use ($app) { |
|
164 | 164 | return $app['orm.em']->getRepository('Eccube\Entity\ClassName'); |
165 | 165 | }); |
166 | - $app['eccube.repository.class_category'] = $app->share(function () use ($app) { |
|
166 | + $app['eccube.repository.class_category'] = $app->share(function() use ($app) { |
|
167 | 167 | return $app['orm.em']->getRepository('Eccube\Entity\ClassCategory'); |
168 | 168 | }); |
169 | - $app['eccube.repository.customer_favorite_product'] = $app->share(function () use ($app) { |
|
169 | + $app['eccube.repository.customer_favorite_product'] = $app->share(function() use ($app) { |
|
170 | 170 | return $app['orm.em']->getRepository('Eccube\Entity\CustomerFavoriteProduct'); |
171 | 171 | }); |
172 | - $app['eccube.repository.base_info'] = $app->share(function () use ($app) { |
|
172 | + $app['eccube.repository.base_info'] = $app->share(function() use ($app) { |
|
173 | 173 | return $app['orm.em']->getRepository('Eccube\Entity\BaseInfo'); |
174 | 174 | }); |
175 | - $app['eccube.repository.tax_rule'] = $app->share(function () use ($app) { |
|
175 | + $app['eccube.repository.tax_rule'] = $app->share(function() use ($app) { |
|
176 | 176 | $taxRuleRepository = $app['orm.em']->getRepository('Eccube\Entity\TaxRule'); |
177 | 177 | $taxRuleRepository->setApplication($app); |
178 | 178 | |
179 | 179 | return $taxRuleRepository; |
180 | 180 | }); |
181 | - $app['eccube.repository.page_layout'] = $app->share(function () use ($app) { |
|
181 | + $app['eccube.repository.page_layout'] = $app->share(function() use ($app) { |
|
182 | 182 | $pageLayoutRepository = $app['orm.em']->getRepository('Eccube\Entity\PageLayout'); |
183 | 183 | $pageLayoutRepository->setApplication($app); |
184 | 184 | |
185 | 185 | return $pageLayoutRepository; |
186 | 186 | }); |
187 | - $app['eccube.repository.block'] = $app->share(function () use ($app) { |
|
187 | + $app['eccube.repository.block'] = $app->share(function() use ($app) { |
|
188 | 188 | $blockRepository = $app['orm.em']->getRepository('Eccube\Entity\Block'); |
189 | 189 | $blockRepository->setApplication($app); |
190 | 190 | |
191 | 191 | return $blockRepository; |
192 | 192 | }); |
193 | - $app['eccube.repository.order'] = $app->share(function () use ($app) { |
|
193 | + $app['eccube.repository.order'] = $app->share(function() use ($app) { |
|
194 | 194 | $orderRepository = $app['orm.em']->getRepository('Eccube\Entity\Order'); |
195 | 195 | $orderRepository->setApplication($app); |
196 | 196 | |
197 | 197 | return $orderRepository; |
198 | 198 | }); |
199 | - $app['eccube.repository.customer_address'] = $app->share(function () use ($app) { |
|
199 | + $app['eccube.repository.customer_address'] = $app->share(function() use ($app) { |
|
200 | 200 | return $app['orm.em']->getRepository('Eccube\Entity\CustomerAddress'); |
201 | 201 | }); |
202 | - $app['eccube.repository.shipping'] = $app->share(function () use ($app) { |
|
202 | + $app['eccube.repository.shipping'] = $app->share(function() use ($app) { |
|
203 | 203 | return $app['orm.em']->getRepository('Eccube\Entity\Shipping'); |
204 | 204 | }); |
205 | - $app['eccube.repository.customer_status'] = $app->share(function () use ($app) { |
|
205 | + $app['eccube.repository.customer_status'] = $app->share(function() use ($app) { |
|
206 | 206 | return $app['orm.em']->getRepository('Eccube\Entity\Master\CustomerStatus'); |
207 | 207 | }); |
208 | - $app['eccube.repository.order_status'] = $app->share(function () use ($app) { |
|
208 | + $app['eccube.repository.order_status'] = $app->share(function() use ($app) { |
|
209 | 209 | return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderStatus'); |
210 | 210 | }); |
211 | - $app['eccube.repository.mail_template'] = $app->share(function () use ($app) { |
|
211 | + $app['eccube.repository.mail_template'] = $app->share(function() use ($app) { |
|
212 | 212 | return $app['orm.em']->getRepository('Eccube\Entity\MailTemplate'); |
213 | 213 | }); |
214 | - $app['eccube.repository.csv'] = $app->share(function () use ($app) { |
|
214 | + $app['eccube.repository.csv'] = $app->share(function() use ($app) { |
|
215 | 215 | return $app['orm.em']->getRepository('Eccube\Entity\Csv'); |
216 | 216 | }); |
217 | - $app['eccube.repository.template'] = $app->share(function () use ($app) { |
|
217 | + $app['eccube.repository.template'] = $app->share(function() use ($app) { |
|
218 | 218 | return $app['orm.em']->getRepository('Eccube\Entity\Template'); |
219 | 219 | }); |
220 | - $app['eccube.repository.authority_role'] = $app->share(function () use ($app) { |
|
220 | + $app['eccube.repository.authority_role'] = $app->share(function() use ($app) { |
|
221 | 221 | return $app['orm.em']->getRepository('Eccube\Entity\AuthorityRole'); |
222 | 222 | }); |
223 | 223 | |
224 | - $app['paginator'] = $app->protect(function () { |
|
224 | + $app['paginator'] = $app->protect(function() { |
|
225 | 225 | return new \Knp\Component\Pager\Paginator(); |
226 | 226 | }); |
227 | 227 | |
228 | - $app['eccube.repository.help'] = $app->share(function () use ($app) { |
|
228 | + $app['eccube.repository.help'] = $app->share(function() use ($app) { |
|
229 | 229 | return $app['orm.em']->getRepository('Eccube\Entity\Help'); |
230 | 230 | }); |
231 | - $app['eccube.repository.plugin'] = $app->share(function () use ($app) { |
|
231 | + $app['eccube.repository.plugin'] = $app->share(function() use ($app) { |
|
232 | 232 | return $app['orm.em']->getRepository('Eccube\Entity\Plugin'); |
233 | 233 | }); |
234 | - $app['eccube.repository.plugin_event_handler'] = $app->share(function () use ($app) { |
|
234 | + $app['eccube.repository.plugin_event_handler'] = $app->share(function() use ($app) { |
|
235 | 235 | return $app['orm.em']->getRepository('Eccube\Entity\PluginEventHandler'); |
236 | 236 | }); |
237 | 237 | // em |
238 | 238 | if (isset($app['orm.em'])) { |
239 | - $app['orm.em'] = $app->share($app->extend('orm.em', function (\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
239 | + $app['orm.em'] = $app->share($app->extend('orm.em', function(\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
240 | 240 | // tax_rule |
241 | 241 | $taxRuleRepository = $em->getRepository('Eccube\Entity\TaxRule'); |
242 | 242 | $taxRuleRepository->setApplication($app); |
@@ -259,13 +259,13 @@ discard block |
||
259 | 259 | } |
260 | 260 | |
261 | 261 | // Form\Type |
262 | - $app['form.type.extensions'] = $app->share($app->extend('form.type.extensions', function ($extensions) use ($app) { |
|
262 | + $app['form.type.extensions'] = $app->share($app->extend('form.type.extensions', function($extensions) use ($app) { |
|
263 | 263 | $extensions[] = new \Eccube\Form\Extension\HelpTypeExtension(); |
264 | 264 | $extensions[] = new \Eccube\Form\Extension\FreezeTypeExtension(); |
265 | 265 | |
266 | 266 | return $extensions; |
267 | 267 | })); |
268 | - $app['form.types'] = $app->share($app->extend('form.types', function ($types) use ($app) { |
|
268 | + $app['form.types'] = $app->share($app->extend('form.types', function($types) use ($app) { |
|
269 | 269 | $types[] = new \Eccube\Form\Type\NameType($app['config']); |
270 | 270 | $types[] = new \Eccube\Form\Type\KanaType($app['config']); |
271 | 271 | $types[] = new \Eccube\Form\Type\TelType($app['config']); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | { |
67 | 67 | public function register(Application $app) |
68 | 68 | { |
69 | - $app['var_dumper.cloner'] = $app->share(function ($app) { |
|
69 | + $app['var_dumper.cloner'] = $app->share(function($app) { |
|
70 | 70 | $cloner = new VarCloner(); |
71 | 71 | |
72 | 72 | if (isset($app['debug.max_items'])) { |
@@ -85,19 +85,19 @@ discard block |
||
85 | 85 | array(array('dump', '@Debug/Profiler/dump.html.twig')) |
86 | 86 | ); |
87 | 87 | |
88 | - $app['data_collector.dump'] = $app->share(function ($app) { |
|
88 | + $app['data_collector.dump'] = $app->share(function($app) { |
|
89 | 89 | return new DumpDataCollector($app['stopwatch'], $app['code.file_link_format']); |
90 | 90 | }); |
91 | 91 | |
92 | - $app['data_collectors'] = $app->share($app->extend('data_collectors', function ($collectors, $app) { |
|
93 | - $collectors['dump'] = $app->share(function ($app) { |
|
92 | + $app['data_collectors'] = $app->share($app->extend('data_collectors', function($collectors, $app) { |
|
93 | + $collectors['dump'] = $app->share(function($app) { |
|
94 | 94 | return $app['data_collector.dump']; |
95 | 95 | }); |
96 | 96 | |
97 | 97 | return $collectors; |
98 | 98 | })); |
99 | 99 | |
100 | - $app['twig'] = $app->share($app->extend('twig', function ($twig, $app) { |
|
100 | + $app['twig'] = $app->share($app->extend('twig', function($twig, $app) { |
|
101 | 101 | if (class_exists('\Symfony\Bridge\Twig\Extension\DumpExtension')) { |
102 | 102 | $twig->addExtension(new DumpExtension($app['var_dumper.cloner'])); |
103 | 103 | } |
@@ -105,13 +105,13 @@ discard block |
||
105 | 105 | return $twig; |
106 | 106 | })); |
107 | 107 | |
108 | - $app['twig.loader.filesystem'] = $app->share($app->extend('twig.loader.filesystem', function ($loader, $app) { |
|
108 | + $app['twig.loader.filesystem'] = $app->share($app->extend('twig.loader.filesystem', function($loader, $app) { |
|
109 | 109 | $loader->addPath($app['debug.templates_path'], 'Debug'); |
110 | 110 | |
111 | 111 | return $loader; |
112 | 112 | })); |
113 | 113 | |
114 | - $app['debug.templates_path'] = function () { |
|
114 | + $app['debug.templates_path'] = function() { |
|
115 | 115 | $r = new \ReflectionClass('Symfony\Bundle\DebugBundle\DependencyInjection\Configuration'); |
116 | 116 | |
117 | 117 | return dirname(dirname($r->getFileName())).'/Resources/views'; |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | // This code is here to lazy load the dump stack. This default |
124 | 124 | // configuration for CLI mode is overridden in HTTP mode on |
125 | 125 | // 'kernel.request' event |
126 | - VarDumper::setHandler(function ($var) use ($app) { |
|
126 | + VarDumper::setHandler(function($var) use ($app) { |
|
127 | 127 | $dumper = new CliDumper(); |
128 | 128 | $dumper->dump($app['var_dumper.cloner']->cloneVar($var)); |
129 | 129 | }); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | // リセットキーの発行・有効期限の設定 |
48 | 48 | $Customer |
49 | 49 | ->setResetKey($app['eccube.repository.customer']->getUniqueResetKey($app)) |
50 | - ->setResetExpire(new \DateTime('+' . $app['config']['customer_reset_expire'] .' min')); |
|
50 | + ->setResetExpire(new \DateTime('+'.$app['config']['customer_reset_expire'].' min')); |
|
51 | 51 | |
52 | 52 | // リセットキーを更新 |
53 | 53 | $app['orm.em']->persist($Customer); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | // ログ出力 |
63 | 63 | $app['monolog']->addInfo( |
64 | - 'send reset password mail to:' . "{$Customer->getId()} {$Customer->getEmail()} {$request->getClientIp()}" |
|
64 | + 'send reset password mail to:'."{$Customer->getId()} {$Customer->getEmail()} {$request->getClientIp()}" |
|
65 | 65 | ); |
66 | 66 | } |
67 | 67 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | |
116 | 116 | // ログ出力 |
117 | 117 | $app['monolog']->addInfo( |
118 | - 'reset password complete:' . "{$Customer->getId()} {$Customer->getEmail()} {$request->getClientIp()}" |
|
118 | + 'reset password complete:'."{$Customer->getId()} {$Customer->getEmail()} {$request->getClientIp()}" |
|
119 | 119 | ); |
120 | 120 | } else { |
121 | 121 | throw new HttpException\AccessDeniedHttpException('不正なアクセスです。'); |
@@ -60,7 +60,7 @@ |
||
60 | 60 | // 会員削除 |
61 | 61 | $email = $Customer->getEmail(); |
62 | 62 | // メールアドレスにダミーをセット |
63 | - $Customer->setEmail(Str::random(60) . '@dummy.dummy'); |
|
63 | + $Customer->setEmail(Str::random(60).'@dummy.dummy'); |
|
64 | 64 | $Customer->setDelFlg(Constant::ENABLED); |
65 | 65 | |
66 | 66 | $app['orm.em']->flush(); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | new Assert\Callback(array($this, 'validate')), |
97 | 97 | ), |
98 | 98 | )) |
99 | - ->addEventListener(FormEvents::POST_SUBMIT, function ($event) { |
|
99 | + ->addEventListener(FormEvents::POST_SUBMIT, function($event) { |
|
100 | 100 | $form = $event->getForm(); |
101 | 101 | $data = $form->getData(); |
102 | 102 | try { |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config); |
122 | 122 | $conn->connect(); |
123 | 123 | } catch (\Exception $e) { |
124 | - $form['database']->addError(new FormError('データベースに接続できませんでした。' . $e->getMessage())); |
|
124 | + $form['database']->addError(new FormError('データベースに接続できませんでした。'.$e->getMessage())); |
|
125 | 125 | } |
126 | 126 | }); |
127 | 127 | } |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | public function validate($data, ExecutionContext $context, $param = null) |
138 | 138 | { |
139 | 139 | $parameters = $this->app['request']->get('install_step4'); |
140 | - if ($parameters['database'] != 'pdo_sqlite'){ |
|
140 | + if ($parameters['database'] != 'pdo_sqlite') { |
|
141 | 141 | $context->validateValue($data, array( |
142 | 142 | new Assert\NotBlank() |
143 | 143 | )); |
@@ -583,6 +583,7 @@ discard block |
||
583 | 583 | /** |
584 | 584 | * 登録、更新時のエラー画面表示 |
585 | 585 | * |
586 | + * @param string $twig |
|
586 | 587 | */ |
587 | 588 | protected function render($app, $form, $headers, $twig) |
588 | 589 | { |
@@ -682,6 +683,7 @@ discard block |
||
682 | 683 | |
683 | 684 | /** |
684 | 685 | * 商品カテゴリの削除、登録 |
686 | + * @param CsvImportService $data |
|
685 | 687 | */ |
686 | 688 | protected function createProductCategory($row, Product $Product, $app, $data) |
687 | 689 | { |
@@ -725,6 +727,7 @@ discard block |
||
725 | 727 | |
726 | 728 | /** |
727 | 729 | * 商品規格分類1、商品規格分類2がnullとなる商品規格情報を作成 |
730 | + * @param CsvImportService $data |
|
728 | 731 | */ |
729 | 732 | protected function createProductClass($row, Product $Product, $app, $data, $ClassCategory1 = null, $ClassCategory2 = null) |
730 | 733 | { |
@@ -866,6 +869,7 @@ discard block |
||
866 | 869 | |
867 | 870 | /** |
868 | 871 | * 商品規格情報を更新 |
872 | + * @param CsvImportService $data |
|
869 | 873 | */ |
870 | 874 | protected function updateProductClass($row, Product $Product, ProductClass $ProductClass, $app, $data) |
871 | 875 | { |
@@ -1012,6 +1016,7 @@ discard block |
||
1012 | 1016 | /** |
1013 | 1017 | * 登録、更新時のエラー画面表示 |
1014 | 1018 | * |
1019 | + * @param string $message |
|
1015 | 1020 | */ |
1016 | 1021 | protected function addErrors($message) |
1017 | 1022 | { |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | foreach ($data as $row) { |
107 | 107 | |
108 | 108 | if ($headerSize != count($row)) { |
109 | - $this->addErrors(($data->key() + 1) . '行目のCSVフォーマットが一致しません。'); |
|
109 | + $this->addErrors(($data->key() + 1).'行目のCSVフォーマットが一致しません。'); |
|
110 | 110 | return $this->render($app, $form, $headers, $this->productTwig); |
111 | 111 | } |
112 | 112 | |
@@ -117,33 +117,33 @@ discard block |
||
117 | 117 | if (is_numeric($row['商品ID'])) { |
118 | 118 | $Product = $app['eccube.repository.product']->find($row['商品ID']); |
119 | 119 | if (!$Product) { |
120 | - $this->addErrors(($data->key() + 1) . '行目の商品IDが存在しません。'); |
|
120 | + $this->addErrors(($data->key() + 1).'行目の商品IDが存在しません。'); |
|
121 | 121 | return $this->render($app, $form, $headers, $this->productTwig); |
122 | 122 | } |
123 | 123 | } else { |
124 | - $this->addErrors(($data->key() + 1) . '行目の商品IDが存在しません。'); |
|
124 | + $this->addErrors(($data->key() + 1).'行目の商品IDが存在しません。'); |
|
125 | 125 | return $this->render($app, $form, $headers, $this->productTwig); |
126 | 126 | } |
127 | 127 | |
128 | 128 | } |
129 | 129 | |
130 | 130 | if ($row['公開ステータス(ID)'] == '') { |
131 | - $this->addErrors(($data->key() + 1) . '行目の公開ステータス(ID)が設定されていません。'); |
|
131 | + $this->addErrors(($data->key() + 1).'行目の公開ステータス(ID)が設定されていません。'); |
|
132 | 132 | } else { |
133 | 133 | if (is_numeric($row['公開ステータス(ID)'])) { |
134 | 134 | $Disp = $app['eccube.repository.master.disp']->find($row['公開ステータス(ID)']); |
135 | 135 | if (!$Disp) { |
136 | - $this->addErrors(($data->key() + 1) . '行目の公開ステータス(ID)が存在しません。'); |
|
136 | + $this->addErrors(($data->key() + 1).'行目の公開ステータス(ID)が存在しません。'); |
|
137 | 137 | } else { |
138 | 138 | $Product->setStatus($Disp); |
139 | 139 | } |
140 | 140 | } else { |
141 | - $this->addErrors(($data->key() + 1) . '行目の公開ステータス(ID)が存在しません。'); |
|
141 | + $this->addErrors(($data->key() + 1).'行目の公開ステータス(ID)が存在しません。'); |
|
142 | 142 | } |
143 | 143 | } |
144 | 144 | |
145 | 145 | if (Str::isBlank($row['商品名'])) { |
146 | - $this->addErrors(($data->key() + 1) . '行目の商品名が設定されていません。'); |
|
146 | + $this->addErrors(($data->key() + 1).'行目の商品名が設定されていません。'); |
|
147 | 147 | return $this->render($app, $form, $headers, $this->productTwig); |
148 | 148 | } else { |
149 | 149 | $Product->setName(Str::trimAll($row['商品名'])); |
@@ -182,10 +182,10 @@ discard block |
||
182 | 182 | if ($row['商品削除フラグ'] == '') { |
183 | 183 | $Product->setDelFlg(Constant::DISABLED); |
184 | 184 | } else { |
185 | - if ($row['商品削除フラグ'] == (string)Constant::DISABLED || $row['商品削除フラグ'] == (string)Constant::ENABLED) { |
|
185 | + if ($row['商品削除フラグ'] == (string) Constant::DISABLED || $row['商品削除フラグ'] == (string) Constant::ENABLED) { |
|
186 | 186 | $Product->setDelFlg($row['商品削除フラグ']); |
187 | 187 | } else { |
188 | - $this->addErrors(($data->key() + 1) . '行目の商品削除フラグが設定されていません。'); |
|
188 | + $this->addErrors(($data->key() + 1).'行目の商品削除フラグが設定されていません。'); |
|
189 | 189 | return $this->render($app, $form, $headers, $this->productTwig); |
190 | 190 | } |
191 | 191 | } |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | if (is_numeric($deliveryFee) && $deliveryFee >= 0) { |
213 | 213 | $ProductClassOrg->setDeliveryFee($deliveryFee); |
214 | 214 | } else { |
215 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
215 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
216 | 216 | } |
217 | 217 | } |
218 | 218 | } |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | if ($row['規格分類1(ID)'] != '') { |
221 | 221 | |
222 | 222 | if ($row['規格分類1(ID)'] == $row['規格分類2(ID)']) { |
223 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
223 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
224 | 224 | } else { |
225 | 225 | // 商品規格あり |
226 | 226 | // 企画分類あり商品を作成 |
@@ -235,30 +235,30 @@ discard block |
||
235 | 235 | if (is_numeric($row['規格分類1(ID)'])) { |
236 | 236 | $ClassCategory1 = $app['eccube.repository.class_category']->find($row['規格分類1(ID)']); |
237 | 237 | if (!$ClassCategory1) { |
238 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
238 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
239 | 239 | } else { |
240 | 240 | $ProductClass->setClassCategory1($ClassCategory1); |
241 | 241 | } |
242 | 242 | } else { |
243 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
243 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
244 | 244 | } |
245 | 245 | |
246 | 246 | if ($row['規格分類2(ID)'] != '') { |
247 | 247 | if (is_numeric($row['規格分類2(ID)'])) { |
248 | 248 | $ClassCategory2 = $app['eccube.repository.class_category']->find($row['規格分類2(ID)']); |
249 | 249 | if (!$ClassCategory2) { |
250 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
250 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
251 | 251 | } else { |
252 | 252 | if ($ClassCategory1 && |
253 | 253 | ($ClassCategory1->getClassName()->getId() == $ClassCategory2->getClassName()->getId()) |
254 | 254 | ) { |
255 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
255 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
256 | 256 | } else { |
257 | 257 | $ProductClass->setClassCategory2($ClassCategory2); |
258 | 258 | } |
259 | 259 | } |
260 | 260 | } else { |
261 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
261 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
262 | 262 | } |
263 | 263 | } |
264 | 264 | $ProductClass->setProductStock($ProductStock); |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | |
271 | 271 | } else { |
272 | 272 | if ($row['規格分類2(ID)'] != '') { |
273 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
273 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
274 | 274 | } |
275 | 275 | } |
276 | 276 | |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | if (is_numeric($deliveryFee) && $deliveryFee >= 0) { |
299 | 299 | $pc->setDeliveryFee($deliveryFee); |
300 | 300 | } else { |
301 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
301 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
302 | 302 | } |
303 | 303 | } |
304 | 304 | } |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | } |
321 | 321 | |
322 | 322 | if ($row['規格分類1(ID)'] == $row['規格分類2(ID)']) { |
323 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
323 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
324 | 324 | } else { |
325 | 325 | |
326 | 326 | // 必ず規格分類1がセットされている |
@@ -329,36 +329,36 @@ discard block |
||
329 | 329 | if (is_numeric($classCategoryId1)) { |
330 | 330 | $ClassCategory1 = $app['eccube.repository.class_category']->find($classCategoryId1); |
331 | 331 | if (!$ClassCategory1) { |
332 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
332 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
333 | 333 | } |
334 | 334 | } else { |
335 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
335 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
336 | 336 | } |
337 | 337 | |
338 | 338 | $ClassCategory2 = null; |
339 | 339 | if ($row['規格分類2(ID)'] != '') { |
340 | 340 | if ($pc->getClassCategory1() != null && $pc->getClassCategory2() == null) { |
341 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)は設定できません。'); |
|
341 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)は設定できません。'); |
|
342 | 342 | } else { |
343 | 343 | if (is_numeric($classCategoryId2)) { |
344 | 344 | $ClassCategory2 = $app['eccube.repository.class_category']->find($classCategoryId2); |
345 | 345 | if (!$ClassCategory2) { |
346 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
346 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
347 | 347 | } else { |
348 | 348 | if ($ClassCategory1 && |
349 | 349 | ($ClassCategory1->getClassName()->getId() == $ClassCategory2->getClassName()->getId()) |
350 | 350 | ) { |
351 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
351 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
352 | 352 | } |
353 | 353 | } |
354 | 354 | } else { |
355 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
355 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
356 | 356 | } |
357 | 357 | |
358 | 358 | } |
359 | 359 | } else { |
360 | 360 | if ($pc->getClassCategory1() != null && $pc->getClassCategory2() != null) { |
361 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)に値を設定してください。'); |
|
361 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)に値を設定してください。'); |
|
362 | 362 | } |
363 | 363 | } |
364 | 364 | $ProductClass = $this->createProductClass($row, $Product, $app, $data, $ClassCategory1, $ClassCategory2); |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | if (is_numeric($deliveryFee) && $deliveryFee >= 0) { |
370 | 370 | $ProductClass->setDeliveryFee($deliveryFee); |
371 | 371 | } else { |
372 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
372 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
373 | 373 | } |
374 | 374 | } |
375 | 375 | } |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | foreach ($data as $row) { |
453 | 453 | |
454 | 454 | if ($headerSize != count($row)) { |
455 | - $this->addErrors(($data->key() + 1) . '行目のCSVフォーマットが一致しません。'); |
|
455 | + $this->addErrors(($data->key() + 1).'行目のCSVフォーマットが一致しません。'); |
|
456 | 456 | return $this->render($app, $form, $headers, $this->categoryTwig); |
457 | 457 | } |
458 | 458 | |
@@ -460,23 +460,23 @@ discard block |
||
460 | 460 | $Category = new Category(); |
461 | 461 | } else { |
462 | 462 | if (!is_numeric($row['カテゴリID'])) { |
463 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリIDが存在しません。'); |
|
463 | + $this->addErrors(($data->key() + 1).'行目のカテゴリIDが存在しません。'); |
|
464 | 464 | return $this->render($app, $form, $headers, $this->categoryTwig); |
465 | 465 | } |
466 | 466 | $Category = $app['eccube.repository.category']->find($row['カテゴリID']); |
467 | 467 | if (!$Category) { |
468 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリIDが存在しません。'); |
|
468 | + $this->addErrors(($data->key() + 1).'行目のカテゴリIDが存在しません。'); |
|
469 | 469 | return $this->render($app, $form, $headers, $this->categoryTwig); |
470 | 470 | } |
471 | 471 | if ($row['カテゴリID'] == $row['親カテゴリID']) { |
472 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリIDと親カテゴリIDが同じです。'); |
|
472 | + $this->addErrors(($data->key() + 1).'行目のカテゴリIDと親カテゴリIDが同じです。'); |
|
473 | 473 | return $this->render($app, $form, $headers, $this->categoryTwig); |
474 | 474 | } |
475 | 475 | |
476 | 476 | } |
477 | 477 | |
478 | 478 | if (Str::isBlank($row['カテゴリ名'])) { |
479 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリ名が設定されていません。'); |
|
479 | + $this->addErrors(($data->key() + 1).'行目のカテゴリ名が設定されていません。'); |
|
480 | 480 | return $this->render($app, $form, $headers, $this->categoryTwig); |
481 | 481 | } else { |
482 | 482 | $Category->setName(Str::trimAll($row['カテゴリ名'])); |
@@ -485,13 +485,13 @@ discard block |
||
485 | 485 | if ($row['親カテゴリID'] != '') { |
486 | 486 | |
487 | 487 | if (!is_numeric($row['親カテゴリID'])) { |
488 | - $this->addErrors(($data->key() + 1) . '行目の親カテゴリIDが存在しません。'); |
|
488 | + $this->addErrors(($data->key() + 1).'行目の親カテゴリIDが存在しません。'); |
|
489 | 489 | return $this->render($app, $form, $headers, $this->categoryTwig); |
490 | 490 | } |
491 | 491 | |
492 | 492 | $ParentCategory = $app['eccube.repository.category']->find($row['親カテゴリID']); |
493 | 493 | if (!$ParentCategory) { |
494 | - $this->addErrors(($data->key() + 1) . '行目の親カテゴリIDが存在しません。'); |
|
494 | + $this->addErrors(($data->key() + 1).'行目の親カテゴリIDが存在しません。'); |
|
495 | 495 | return $this->render($app, $form, $headers, $this->categoryTwig); |
496 | 496 | } |
497 | 497 | |
@@ -507,14 +507,14 @@ discard block |
||
507 | 507 | } |
508 | 508 | |
509 | 509 | if ($app['config']['category_nest_level'] < $Category->getLevel()) { |
510 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリが最大レベルを超えているため設定できません。'); |
|
510 | + $this->addErrors(($data->key() + 1).'行目のカテゴリが最大レベルを超えているため設定できません。'); |
|
511 | 511 | return $this->render($app, $form, $headers, $this->categoryTwig); |
512 | 512 | } |
513 | 513 | |
514 | 514 | $status = $app['eccube.repository.category']->save($Category); |
515 | 515 | |
516 | 516 | if (!$status) { |
517 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリが設定できません。'); |
|
517 | + $this->addErrors(($data->key() + 1).'行目のカテゴリが設定できません。'); |
|
518 | 518 | } |
519 | 519 | |
520 | 520 | if ($this->hasErrors()) { |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | throw new NotFoundHttpException(); |
558 | 558 | } |
559 | 559 | |
560 | - $response->setCallback(function () use ($app, $request, $headers) { |
|
560 | + $response->setCallback(function() use ($app, $request, $headers) { |
|
561 | 561 | |
562 | 562 | // ヘッダ行の出力 |
563 | 563 | $row = array(); |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | }); |
573 | 573 | |
574 | 574 | $response->headers->set('Content-Type', 'application/octet-stream'); |
575 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
575 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
576 | 576 | $response->send(); |
577 | 577 | |
578 | 578 | return $response; |
@@ -595,7 +595,7 @@ discard block |
||
595 | 595 | if (!empty($this->fileName)) { |
596 | 596 | try { |
597 | 597 | $fs = new Filesystem(); |
598 | - $fs->remove($app['config']['csv_temp_realdir'] . '/' . $this->fileName); |
|
598 | + $fs->remove($app['config']['csv_temp_realdir'].'/'.$this->fileName); |
|
599 | 599 | } catch (\Exception $e) { |
600 | 600 | // エラーが発生しても無視する |
601 | 601 | } |
@@ -618,10 +618,10 @@ discard block |
||
618 | 618 | protected function getImportData($app, $formFile) |
619 | 619 | { |
620 | 620 | // アップロードされたCSVファイルを一時ディレクトリに保存 |
621 | - $this->fileName = 'upload_' . Str::random() . '.' . $formFile->getClientOriginalExtension(); |
|
621 | + $this->fileName = 'upload_'.Str::random().'.'.$formFile->getClientOriginalExtension(); |
|
622 | 622 | $formFile->move($app['config']['csv_temp_realdir'], $this->fileName); |
623 | 623 | |
624 | - $file = file_get_contents($app['config']['csv_temp_realdir'] . '/' . $this->fileName); |
|
624 | + $file = file_get_contents($app['config']['csv_temp_realdir'].'/'.$this->fileName); |
|
625 | 625 | // アップロードされたファイルがUTF-8以外は文字コード変換を行う |
626 | 626 | $encode = Str::characterEncoding(substr($file, 0, 6)); |
627 | 627 | if ($encode != 'UTF-8') { |
@@ -763,7 +763,7 @@ discard block |
||
763 | 763 | } |
764 | 764 | } |
765 | 765 | if (!$Tag) { |
766 | - $this->addErrors(($data->key() + 1) . '行目のタグ(ID)「' . $tag_id . '」が存在しません。'); |
|
766 | + $this->addErrors(($data->key() + 1).'行目のタグ(ID)「'.$tag_id.'」が存在しません。'); |
|
767 | 767 | } |
768 | 768 | } |
769 | 769 | } |
@@ -781,17 +781,17 @@ discard block |
||
781 | 781 | |
782 | 782 | |
783 | 783 | if ($row['商品種別(ID)'] == '') { |
784 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が設定されていません。'); |
|
784 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が設定されていません。'); |
|
785 | 785 | } else { |
786 | 786 | if (is_numeric($row['商品種別(ID)'])) { |
787 | 787 | $ProductType = $app['eccube.repository.master.product_type']->find($row['商品種別(ID)']); |
788 | 788 | if (!$ProductType) { |
789 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
789 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
790 | 790 | } else { |
791 | 791 | $ProductClass->setProductType($ProductType); |
792 | 792 | } |
793 | 793 | } else { |
794 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
794 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
795 | 795 | } |
796 | 796 | } |
797 | 797 | |
@@ -802,12 +802,12 @@ discard block |
||
802 | 802 | if (is_numeric($row['発送日目安(ID)'])) { |
803 | 803 | $DeliveryDate = $app['eccube.repository.delivery_date']->find($row['発送日目安(ID)']); |
804 | 804 | if (!$DeliveryDate) { |
805 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
805 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
806 | 806 | } else { |
807 | 807 | $ProductClass->setDeliveryDate($DeliveryDate); |
808 | 808 | } |
809 | 809 | } else { |
810 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
810 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
811 | 811 | } |
812 | 812 | } |
813 | 813 | |
@@ -818,19 +818,19 @@ discard block |
||
818 | 818 | } |
819 | 819 | |
820 | 820 | if ($row['在庫数無制限フラグ'] == '') { |
821 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
821 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
822 | 822 | } else { |
823 | 823 | if ($row['在庫数無制限フラグ'] == (string) Constant::DISABLED) { |
824 | 824 | $ProductClass->setStockUnlimited(Constant::DISABLED); |
825 | 825 | // 在庫数が設定されていなければエラー |
826 | 826 | if ($row['在庫数'] == '') { |
827 | - $this->addErrors(($data->key() + 1) . '行目の在庫数が設定されていません。'); |
|
827 | + $this->addErrors(($data->key() + 1).'行目の在庫数が設定されていません。'); |
|
828 | 828 | } else { |
829 | 829 | $stock = str_replace(',', '', $row['在庫数']); |
830 | 830 | if (is_numeric($stock) && $stock >= 0) { |
831 | 831 | $ProductClass->setStock($stock); |
832 | 832 | } else { |
833 | - $this->addErrors(($data->key() + 1) . '行目の在庫数は0以上の数値を設定してください。'); |
|
833 | + $this->addErrors(($data->key() + 1).'行目の在庫数は0以上の数値を設定してください。'); |
|
834 | 834 | } |
835 | 835 | } |
836 | 836 | |
@@ -838,7 +838,7 @@ discard block |
||
838 | 838 | $ProductClass->setStockUnlimited(Constant::ENABLED); |
839 | 839 | $ProductClass->setStock(null); |
840 | 840 | } else { |
841 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
841 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
842 | 842 | } |
843 | 843 | } |
844 | 844 | |
@@ -847,7 +847,7 @@ discard block |
||
847 | 847 | if (is_numeric($saleLimit) && $saleLimit >= 0) { |
848 | 848 | $ProductClass->setSaleLimit($saleLimit); |
849 | 849 | } else { |
850 | - $this->addErrors(($data->key() + 1) . '行目の販売制限数は0以上の数値を設定してください。'); |
|
850 | + $this->addErrors(($data->key() + 1).'行目の販売制限数は0以上の数値を設定してください。'); |
|
851 | 851 | } |
852 | 852 | } |
853 | 853 | |
@@ -856,18 +856,18 @@ discard block |
||
856 | 856 | if (is_numeric($price01) && $price01 >= 0) { |
857 | 857 | $ProductClass->setPrice01($price01); |
858 | 858 | } else { |
859 | - $this->addErrors(($data->key() + 1) . '行目の通常価格は0以上の数値を設定してください。'); |
|
859 | + $this->addErrors(($data->key() + 1).'行目の通常価格は0以上の数値を設定してください。'); |
|
860 | 860 | } |
861 | 861 | } |
862 | 862 | |
863 | 863 | if ($row['販売価格'] == '') { |
864 | - $this->addErrors(($data->key() + 1) . '行目の販売価格が設定されていません。'); |
|
864 | + $this->addErrors(($data->key() + 1).'行目の販売価格が設定されていません。'); |
|
865 | 865 | } else { |
866 | 866 | $price02 = str_replace(',', '', $row['販売価格']); |
867 | 867 | if (is_numeric($price02) && $price02 >= 0) { |
868 | 868 | $ProductClass->setPrice02($price02); |
869 | 869 | } else { |
870 | - $this->addErrors(($data->key() + 1) . '行目の販売価格は0以上の数値を設定してください。'); |
|
870 | + $this->addErrors(($data->key() + 1).'行目の販売価格は0以上の数値を設定してください。'); |
|
871 | 871 | } |
872 | 872 | } |
873 | 873 | |
@@ -876,7 +876,7 @@ discard block |
||
876 | 876 | if (is_numeric($delivery_fee) && $delivery_fee >= 0) { |
877 | 877 | $ProductClass->setDeliveryFee($delivery_fee); |
878 | 878 | } else { |
879 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
879 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
880 | 880 | } |
881 | 881 | } |
882 | 882 | |
@@ -886,7 +886,7 @@ discard block |
||
886 | 886 | if ($row['商品規格削除フラグ'] == (string) Constant::DISABLED || $row['商品規格削除フラグ'] == (string) Constant::ENABLED) { |
887 | 887 | $ProductClass->setDelFlg($row['商品規格削除フラグ']); |
888 | 888 | } else { |
889 | - $this->addErrors(($data->key() + 1) . '行目の商品規格削除フラグが設定されていません。'); |
|
889 | + $this->addErrors(($data->key() + 1).'行目の商品規格削除フラグが設定されていません。'); |
|
890 | 890 | } |
891 | 891 | } |
892 | 892 | |
@@ -919,17 +919,17 @@ discard block |
||
919 | 919 | $ProductClass->setProduct($Product); |
920 | 920 | |
921 | 921 | if ($row['商品種別(ID)'] == '') { |
922 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が設定されていません。'); |
|
922 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が設定されていません。'); |
|
923 | 923 | } else { |
924 | 924 | if (is_numeric($row['商品種別(ID)'])) { |
925 | 925 | $ProductType = $app['eccube.repository.master.product_type']->find($row['商品種別(ID)']); |
926 | 926 | if (!$ProductType) { |
927 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
927 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
928 | 928 | } else { |
929 | 929 | $ProductClass->setProductType($ProductType); |
930 | 930 | } |
931 | 931 | } else { |
932 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
932 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
933 | 933 | } |
934 | 934 | } |
935 | 935 | |
@@ -938,12 +938,12 @@ discard block |
||
938 | 938 | if (is_numeric($row['規格分類1(ID)'])) { |
939 | 939 | $ClassCategory = $app['eccube.repository.class_category']->find($row['規格分類1(ID)']); |
940 | 940 | if (!$ClassCategory) { |
941 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
941 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
942 | 942 | } else { |
943 | 943 | $ProductClass->setClassCategory1($ClassCategory); |
944 | 944 | } |
945 | 945 | } else { |
946 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
946 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
947 | 947 | } |
948 | 948 | } |
949 | 949 | |
@@ -951,12 +951,12 @@ discard block |
||
951 | 951 | if (is_numeric($row['規格分類2(ID)'])) { |
952 | 952 | $ClassCategory = $app['eccube.repository.class_category']->find($row['規格分類2(ID)']); |
953 | 953 | if (!$ClassCategory) { |
954 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
954 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
955 | 955 | } else { |
956 | 956 | $ProductClass->setClassCategory2($ClassCategory); |
957 | 957 | } |
958 | 958 | } else { |
959 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
959 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
960 | 960 | } |
961 | 961 | } |
962 | 962 | |
@@ -964,12 +964,12 @@ discard block |
||
964 | 964 | if (is_numeric($row['発送日目安(ID)'])) { |
965 | 965 | $DeliveryDate = $app['eccube.repository.delivery_date']->find($row['発送日目安(ID)']); |
966 | 966 | if (!$DeliveryDate) { |
967 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
967 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
968 | 968 | } else { |
969 | 969 | $ProductClass->setDeliveryDate($DeliveryDate); |
970 | 970 | } |
971 | 971 | } else { |
972 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
972 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
973 | 973 | } |
974 | 974 | } |
975 | 975 | |
@@ -980,19 +980,19 @@ discard block |
||
980 | 980 | } |
981 | 981 | |
982 | 982 | if ($row['在庫数無制限フラグ'] == '') { |
983 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
983 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
984 | 984 | } else { |
985 | 985 | if ($row['在庫数無制限フラグ'] == (string) Constant::DISABLED) { |
986 | 986 | $ProductClass->setStockUnlimited(Constant::DISABLED); |
987 | 987 | // 在庫数が設定されていなければエラー |
988 | 988 | if ($row['在庫数'] == '') { |
989 | - $this->addErrors(($data->key() + 1) . '行目の在庫数が設定されていません。'); |
|
989 | + $this->addErrors(($data->key() + 1).'行目の在庫数が設定されていません。'); |
|
990 | 990 | } else { |
991 | 991 | $stock = str_replace(',', '', $row['在庫数']); |
992 | 992 | if (is_numeric($stock) && $stock >= 0) { |
993 | 993 | $ProductClass->setStock($row['在庫数']); |
994 | 994 | } else { |
995 | - $this->addErrors(($data->key() + 1) . '行目の在庫数は0以上の数値を設定してください。'); |
|
995 | + $this->addErrors(($data->key() + 1).'行目の在庫数は0以上の数値を設定してください。'); |
|
996 | 996 | } |
997 | 997 | } |
998 | 998 | |
@@ -1000,7 +1000,7 @@ discard block |
||
1000 | 1000 | $ProductClass->setStockUnlimited(Constant::ENABLED); |
1001 | 1001 | $ProductClass->setStock(null); |
1002 | 1002 | } else { |
1003 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
1003 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
1004 | 1004 | } |
1005 | 1005 | } |
1006 | 1006 | |
@@ -1009,7 +1009,7 @@ discard block |
||
1009 | 1009 | if (is_numeric($saleLimit) && $saleLimit >= 0) { |
1010 | 1010 | $ProductClass->setSaleLimit($saleLimit); |
1011 | 1011 | } else { |
1012 | - $this->addErrors(($data->key() + 1) . '行目の販売制限数は0以上の数値を設定してください。'); |
|
1012 | + $this->addErrors(($data->key() + 1).'行目の販売制限数は0以上の数値を設定してください。'); |
|
1013 | 1013 | } |
1014 | 1014 | } |
1015 | 1015 | |
@@ -1018,18 +1018,18 @@ discard block |
||
1018 | 1018 | if (is_numeric($price01) && $price01 >= 0) { |
1019 | 1019 | $ProductClass->setPrice01($price01); |
1020 | 1020 | } else { |
1021 | - $this->addErrors(($data->key() + 1) . '行目の通常価格は0以上の数値を設定してください。'); |
|
1021 | + $this->addErrors(($data->key() + 1).'行目の通常価格は0以上の数値を設定してください。'); |
|
1022 | 1022 | } |
1023 | 1023 | } |
1024 | 1024 | |
1025 | 1025 | if ($row['販売価格'] == '') { |
1026 | - $this->addErrors(($data->key() + 1) . '行目の販売価格が設定されていません。'); |
|
1026 | + $this->addErrors(($data->key() + 1).'行目の販売価格が設定されていません。'); |
|
1027 | 1027 | } else { |
1028 | 1028 | $price02 = str_replace(',', '', $row['販売価格']); |
1029 | 1029 | if (is_numeric($price02) && $price02 >= 0) { |
1030 | 1030 | $ProductClass->setPrice02($price02); |
1031 | 1031 | } else { |
1032 | - $this->addErrors(($data->key() + 1) . '行目の販売価格は0以上の数値を設定してください。'); |
|
1032 | + $this->addErrors(($data->key() + 1).'行目の販売価格は0以上の数値を設定してください。'); |
|
1033 | 1033 | } |
1034 | 1034 | } |
1035 | 1035 | |
@@ -1039,7 +1039,7 @@ discard block |
||
1039 | 1039 | if ($row['商品規格削除フラグ'] == (string) Constant::DISABLED || $row['商品規格削除フラグ'] == (string) Constant::ENABLED) { |
1040 | 1040 | $ProductClass->setDelFlg($row['商品規格削除フラグ']); |
1041 | 1041 | } else { |
1042 | - $this->addErrors(($data->key() + 1) . '行目の商品規格削除フラグが設定されていません。'); |
|
1042 | + $this->addErrors(($data->key() + 1).'行目の商品規格削除フラグが設定されていません。'); |
|
1043 | 1043 | } |
1044 | 1044 | } |
1045 | 1045 |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | foreach ($images as $img) { |
178 | 178 | foreach ($img as $image) { |
179 | 179 | $extension = $image->getClientOriginalExtension(); |
180 | - $filename = date('mdHis') . uniqid('_') . '.' . $extension; |
|
180 | + $filename = date('mdHis').uniqid('_').'.'.$extension; |
|
181 | 181 | $image->move($app['config']['image_temp_realdir'], $filename); |
182 | 182 | $files[] = $filename; |
183 | 183 | } |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | $app['eccube.event.dispatcher']->dispatch(EccubeEvents::ADMIN_PRODUCT_EDIT_INITIALIZE, $event); |
240 | 240 | |
241 | 241 | if (!$has_class) { |
242 | - $ProductClass->setStockUnlimited((boolean)$ProductClass->getStockUnlimited()); |
|
242 | + $ProductClass->setStockUnlimited((boolean) $ProductClass->getStockUnlimited()); |
|
243 | 243 | $form['class']->setData($ProductClass); |
244 | 244 | } |
245 | 245 | |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | $app['orm.em']->persist($ProductImage); |
338 | 338 | |
339 | 339 | // 移動 |
340 | - $file = new File($app['config']['image_temp_realdir'] . '/' . $add_image); |
|
340 | + $file = new File($app['config']['image_temp_realdir'].'/'.$add_image); |
|
341 | 341 | $file->move($app['config']['image_save_realdir']); |
342 | 342 | } |
343 | 343 | |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | |
358 | 358 | // 削除 |
359 | 359 | $fs = new Filesystem(); |
360 | - $fs->remove($app['config']['image_save_realdir'] . '/' . $delete_image); |
|
360 | + $fs->remove($app['config']['image_save_realdir'].'/'.$delete_image); |
|
361 | 361 | } |
362 | 362 | $app['orm.em']->persist($Product); |
363 | 363 | $app['orm.em']->flush(); |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | foreach ($deleteImages as $deleteImage) { |
464 | 464 | try { |
465 | 465 | $fs = new Filesystem(); |
466 | - $fs->remove($app['config']['image_save_realdir'] . '/' . $deleteImage); |
|
466 | + $fs->remove($app['config']['image_save_realdir'].'/'.$deleteImage); |
|
467 | 467 | } catch (\Exception $e) { |
468 | 468 | // エラーが発生しても無視する |
469 | 469 | } |
@@ -527,10 +527,10 @@ discard block |
||
527 | 527 | |
528 | 528 | // 画像ファイルを新規作成 |
529 | 529 | $extension = pathinfo($Image->getFileName(), PATHINFO_EXTENSION); |
530 | - $filename = date('mdHis') . uniqid('_') . '.' . $extension; |
|
530 | + $filename = date('mdHis').uniqid('_').'.'.$extension; |
|
531 | 531 | try { |
532 | 532 | $fs = new Filesystem(); |
533 | - $fs->copy($app['config']['image_save_realdir'] . '/' . $Image->getFileName(), $app['config']['image_save_realdir'] . '/' . $filename); |
|
533 | + $fs->copy($app['config']['image_save_realdir'].'/'.$Image->getFileName(), $app['config']['image_save_realdir'].'/'.$filename); |
|
534 | 534 | } catch (\Exception $e) { |
535 | 535 | // エラーが発生しても無視する |
536 | 536 | } |
@@ -585,7 +585,7 @@ discard block |
||
585 | 585 | $em->getConfiguration()->setSQLLogger(null); |
586 | 586 | |
587 | 587 | $response = new StreamedResponse(); |
588 | - $response->setCallback(function () use ($app, $request) { |
|
588 | + $response->setCallback(function() use ($app, $request) { |
|
589 | 589 | |
590 | 590 | // CSV種別を元に初期化. |
591 | 591 | $app['eccube.service.csv.export']->initCsvType(CsvType::CSV_TYPE_PRODUCT); |
@@ -609,7 +609,7 @@ discard block |
||
609 | 609 | |
610 | 610 | // データ行の出力. |
611 | 611 | $app['eccube.service.csv.export']->setExportQueryBuilder($qb); |
612 | - $app['eccube.service.csv.export']->exportData(function ($entity, $csvService) { |
|
612 | + $app['eccube.service.csv.export']->exportData(function($entity, $csvService) { |
|
613 | 613 | |
614 | 614 | $Csvs = $csvService->getCsvs(); |
615 | 615 | |
@@ -641,9 +641,9 @@ discard block |
||
641 | 641 | }); |
642 | 642 | |
643 | 643 | $now = new \DateTime(); |
644 | - $filename = 'product_' . $now->format('YmdHis') . '.csv'; |
|
644 | + $filename = 'product_'.$now->format('YmdHis').'.csv'; |
|
645 | 645 | $response->headers->set('Content-Type', 'application/octet-stream'); |
646 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
646 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
647 | 647 | $response->send(); |
648 | 648 | |
649 | 649 | return $response; |
@@ -106,7 +106,7 @@ |
||
106 | 106 | )); |
107 | 107 | $addCartForm = $builder->getForm(); |
108 | 108 | |
109 | - if ($request->getMethod() === 'POST' && (string)$Product->getId() === $request->get('product_id')) { |
|
109 | + if ($request->getMethod() === 'POST' && (string) $Product->getId() === $request->get('product_id')) { |
|
110 | 110 | $addCartForm->handleRequest($request); |
111 | 111 | |
112 | 112 | if ($addCartForm->isValid()) { |
@@ -20,32 +20,32 @@ discard block |
||
20 | 20 | */ |
21 | 21 | public function addSuccess($message, $namespace = 'front') |
22 | 22 | { |
23 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.success', $message); |
|
23 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.success', $message); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | public function addError($message, $namespace = 'front') |
27 | 27 | { |
28 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.error', $message); |
|
28 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.error', $message); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | public function addDanger($message, $namespace = 'front') |
32 | 32 | { |
33 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.danger', $message); |
|
33 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.danger', $message); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | public function addWarning($message, $namespace = 'front') |
37 | 37 | { |
38 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.warning', $message); |
|
38 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.warning', $message); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | public function addInfo($message, $namespace = 'front') |
42 | 42 | { |
43 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.info', $message); |
|
43 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.info', $message); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | public function addRequestError($message, $namespace = 'front') |
47 | 47 | { |
48 | - $this['session']->getFlashBag()->set('eccube.' . $namespace . '.request.error', $message); |
|
48 | + $this['session']->getFlashBag()->set('eccube.'.$namespace.'.request.error', $message); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | public function clearMessage() |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | if (is_null($namespace)) { |
65 | 65 | $this['session']->getFlashBag()->set('eccube.login.target.path', $targetPath); |
66 | 66 | } else { |
67 | - $this['session']->getFlashBag()->set('eccube.' . $namespace . '.login.target.path', $targetPath); |
|
67 | + $this['session']->getFlashBag()->set('eccube.'.$namespace.'.login.target.path', $targetPath); |
|
68 | 68 | } |
69 | 69 | } |
70 | 70 | |
@@ -234,14 +234,14 @@ discard block |
||
234 | 234 | $eventName = $view; |
235 | 235 | if ($this->isAdminRequest()) { |
236 | 236 | // 管理画面の場合、event名に「Admin/」を付ける |
237 | - $eventName = 'Admin/' . $view; |
|
237 | + $eventName = 'Admin/'.$view; |
|
238 | 238 | } |
239 | - $this['monolog']->debug('Template Event Name : ' . $eventName); |
|
239 | + $this['monolog']->debug('Template Event Name : '.$eventName); |
|
240 | 240 | |
241 | 241 | $this['eccube.event.dispatcher']->dispatch($eventName, $event); |
242 | 242 | |
243 | 243 | if ($response instanceof StreamedResponse) { |
244 | - $response->setCallback(function () use ($twig, $view, $parameters) { |
|
244 | + $response->setCallback(function() use ($twig, $view, $parameters) { |
|
245 | 245 | $twig->display($view, $parameters); |
246 | 246 | }); |
247 | 247 | } else { |