@@ -257,7 +257,7 @@ |
||
257 | 257 | } |
258 | 258 | |
259 | 259 | foreach ($readPaths as $readPath) { |
260 | - $filePath = $readPath . '/' . $fileName . '.twig'; |
|
260 | + $filePath = $readPath.'/'.$fileName.'.twig'; |
|
261 | 261 | $fs = new Filesystem(); |
262 | 262 | if ($fs->exists($filePath)) { |
263 | 263 | return array( |
@@ -59,7 +59,7 @@ |
||
59 | 59 | 'label' => '拒否URL', |
60 | 60 | 'required' => false, |
61 | 61 | )) |
62 | - ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
62 | + ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
63 | 63 | $form = $event->getForm(); |
64 | 64 | |
65 | 65 | $Authority = $form['Authority']->getData(); |
@@ -36,7 +36,7 @@ |
||
36 | 36 | |
37 | 37 | public function __construct(Application $app) |
38 | 38 | { |
39 | - $this->app = $app; |
|
39 | + $this->app = $app; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | public function supportsAttribute($attribute) |
@@ -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 | }); |
@@ -36,18 +36,18 @@ discard block |
||
36 | 36 | { |
37 | 37 | $events = array(); |
38 | 38 | // YamlでParseしてがんばる |
39 | - $basePath = __DIR__ . '/../../../app/Plugin'; |
|
39 | + $basePath = __DIR__.'/../../../app/Plugin'; |
|
40 | 40 | $finder = Finder::create() |
41 | 41 | ->in($basePath) |
42 | 42 | ->directories() |
43 | 43 | ->depth(0); |
44 | 44 | |
45 | 45 | foreach ($finder as $dir) { |
46 | - $config = Yaml::parse(file_get_contents($dir->getRealPath() . '/config.yml')); |
|
46 | + $config = Yaml::parse(file_get_contents($dir->getRealPath().'/config.yml')); |
|
47 | 47 | |
48 | 48 | if (isset($config['form'])) { |
49 | 49 | foreach ($config['form'] as $event => $class) { |
50 | - $events[$event][] = '\\Plugin\\' . $config['code'] . '\\' . $class; |
|
50 | + $events[$event][] = '\\Plugin\\'.$config['code'].'\\'.$class; |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $events = self::getEvents(); |
72 | 72 | |
73 | 73 | if (isset($events['onPreSetData'])) { |
74 | - foreach($events['onPreSetData'] as $formEventClass) { |
|
74 | + foreach ($events['onPreSetData'] as $formEventClass) { |
|
75 | 75 | $formEvent = new $formEventClass(); |
76 | 76 | $formEvent->onPreSetData($event); |
77 | 77 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $events = self::getEvents(); |
84 | 84 | |
85 | 85 | if (isset($events['onPostSetData'])) { |
86 | - foreach($events['onPostSetData'] as $formEventClass) { |
|
86 | + foreach ($events['onPostSetData'] as $formEventClass) { |
|
87 | 87 | $formEvent = new $formEventClass(); |
88 | 88 | $formEvent->onPostSetData($event); |
89 | 89 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $events = self::getEvents(); |
96 | 96 | |
97 | 97 | if (isset($events['onPreSubmit'])) { |
98 | - foreach($events['onPreSubmit'] as $formEventClass) { |
|
98 | + foreach ($events['onPreSubmit'] as $formEventClass) { |
|
99 | 99 | $formEvent = new $formEventClass(); |
100 | 100 | $formEvent->onPreSubmit($event); |
101 | 101 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $events = self::getEvents(); |
108 | 108 | |
109 | 109 | if (isset($events['onSubmit'])) { |
110 | - foreach($events['onSubmit'] as $formEventClass) { |
|
110 | + foreach ($events['onSubmit'] as $formEventClass) { |
|
111 | 111 | $formEvent = new $formEventClass(); |
112 | 112 | $formEvent->onSubmit($event); |
113 | 113 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $events = self::getEvents(); |
120 | 120 | |
121 | 121 | if (isset($events['onPostSubmit'])) { |
122 | - foreach($events['onPostSubmit'] as $formEventClass) { |
|
122 | + foreach ($events['onPostSubmit'] as $formEventClass) { |
|
123 | 123 | $formEvent = new $formEventClass(); |
124 | 124 | $formEvent->onPostSubmit($event); |
125 | 125 | } |