@@ -93,7 +93,7 @@ |
||
93 | 93 | * |
94 | 94 | * @param Application $app |
95 | 95 | * @param Request $request |
96 | - * @return array |
|
96 | + * @return Response |
|
97 | 97 | */ |
98 | 98 | public function examplePayment(Application $app, Request $request) |
99 | 99 | { |
@@ -3,21 +3,13 @@ |
||
3 | 3 | |
4 | 4 | use Eccube\Application; |
5 | 5 | use Eccube\Entity\Payment; |
6 | -use Eccube\Event\EccubeEvents; |
|
7 | -use Eccube\Event\EventArgs; |
|
8 | 6 | use Eccube\Form\Type\Shopping\OrderType; |
9 | -use Plugin\ExamplePlugin\Service\Calculator\Strategy\ExamplePaymentStrategy; |
|
10 | 7 | use Plugin\ExamplePlugin\Entity\ExamplePayment; |
11 | -use Symfony\Component\Form\Extension\Core\Type\TextareaType; |
|
12 | 8 | use Symfony\Component\HttpFoundation\Response; |
13 | 9 | use Symfony\Component\HttpFoundation\Request; |
14 | -use Symfony\Component\HttpFoundation\ParameterBag; |
|
15 | -use Symfony\Component\Validator\Constraints\Length; |
|
16 | 10 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
17 | 11 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; |
18 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; |
|
19 | 12 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
20 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; |
|
21 | 13 | |
22 | 14 | /** |
23 | 15 | * @Route("/shopping") |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Eccube\Common\Constant; |
6 | 6 | use Eccube\Plugin\AbstractPluginManager; |
7 | -use Symfony\Component\Filesystem\Filesystem; |
|
8 | 7 | use Plugin\ExamplePlugin\Entity\ExamplePayment; |
9 | 8 | |
10 | 9 | class PluginManager extends AbstractPluginManager |
@@ -30,7 +30,6 @@ |
||
30 | 30 | use Eccube\Exception\PluginException; |
31 | 31 | use Eccube\Form\Type\Admin\PluginLocalInstallType; |
32 | 32 | use Eccube\Util\Str; |
33 | -use Monolog\Logger; |
|
34 | 33 | use Symfony\Component\Filesystem\Filesystem; |
35 | 34 | use Symfony\Component\Finder\Finder; |
36 | 35 | use Symfony\Component\Form\Extension\Core\Type\TextType; |
@@ -38,14 +38,14 @@ |
||
38 | 38 | */ |
39 | 39 | public function buildForm(FormBuilderInterface $builder, array $options) |
40 | 40 | { |
41 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
41 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
42 | 42 | $options = $event->getForm()->getConfig()->getOptions(); |
43 | 43 | if (!$event->getData()) { |
44 | 44 | $data = current(array_keys($options['choice_loader']->loadChoiceList()->getValues())); |
45 | 45 | $event->setData($data); |
46 | 46 | } |
47 | 47 | }); |
48 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
48 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) { |
|
49 | 49 | $options = $event->getForm()->getConfig()->getOptions(); |
50 | 50 | $values = $options['choice_loader']->loadChoiceList()->getValues(); |
51 | 51 | if (!in_array($event->getData(), $values)) { |
@@ -38,21 +38,21 @@ |
||
38 | 38 | */ |
39 | 39 | public function buildForm(FormBuilderInterface $builder, array $options) |
40 | 40 | { |
41 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
42 | - $options = $event->getForm()->getConfig()->getOptions(); |
|
43 | - if (!$event->getData()) { |
|
44 | - $data = current(array_keys($options['choice_loader']->loadChoiceList()->getValues())); |
|
45 | - $event->setData($data); |
|
46 | - } |
|
47 | - }); |
|
48 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
49 | - $options = $event->getForm()->getConfig()->getOptions(); |
|
50 | - $values = $options['choice_loader']->loadChoiceList()->getValues(); |
|
51 | - if (!in_array($event->getData(), $values)) { |
|
52 | - $data = current($values); |
|
53 | - $event->setData($data); |
|
54 | - } |
|
55 | - }); |
|
41 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
42 | + $options = $event->getForm()->getConfig()->getOptions(); |
|
43 | + if (!$event->getData()) { |
|
44 | + $data = current(array_keys($options['choice_loader']->loadChoiceList()->getValues())); |
|
45 | + $event->setData($data); |
|
46 | + } |
|
47 | + }); |
|
48 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
49 | + $options = $event->getForm()->getConfig()->getOptions(); |
|
50 | + $values = $options['choice_loader']->loadChoiceList()->getValues(); |
|
51 | + if (!in_array($event->getData(), $values)) { |
|
52 | + $data = current($values); |
|
53 | + $event->setData($data); |
|
54 | + } |
|
55 | + }); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
@@ -38,14 +38,14 @@ |
||
38 | 38 | */ |
39 | 39 | public function buildForm(FormBuilderInterface $builder, array $options) |
40 | 40 | { |
41 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
41 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
42 | 42 | $options = $event->getForm()->getConfig()->getOptions(); |
43 | 43 | if (!$event->getData()) { |
44 | 44 | $data = current(array_keys($options['choice_loader']->loadChoiceList()->getValues())); |
45 | 45 | $event->setData($data); |
46 | 46 | } |
47 | 47 | }); |
48 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
48 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) { |
|
49 | 49 | $options = $event->getForm()->getConfig()->getOptions(); |
50 | 50 | $values = $options['choice_loader']->loadChoiceList()->getValues(); |
51 | 51 | if (!in_array($event->getData(), $values)) { |
@@ -42,7 +42,7 @@ |
||
42 | 42 | 'expanded' => false, |
43 | 43 | 'required' => false, |
44 | 44 | 'placeholder' => false, |
45 | - 'query_builder' => function (EntityRepository $er) { |
|
45 | + 'query_builder' => function(EntityRepository $er) { |
|
46 | 46 | return $er->createQueryBuilder('m') |
47 | 47 | ->orderBy('m.rank', 'ASC'); |
48 | 48 | }, |
@@ -38,14 +38,14 @@ |
||
38 | 38 | */ |
39 | 39 | public function buildForm(FormBuilderInterface $builder, array $options) |
40 | 40 | { |
41 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
41 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
42 | 42 | $options = $event->getForm()->getConfig()->getOptions(); |
43 | 43 | if (!$event->getData()) { |
44 | 44 | $data = current(array_keys($options['choice_loader']->loadChoiceList()->getValues())); |
45 | 45 | $event->setData($data); |
46 | 46 | } |
47 | 47 | }); |
48 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
48 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) { |
|
49 | 49 | $options = $event->getForm()->getConfig()->getOptions(); |
50 | 50 | $values = $options['choice_loader']->loadChoiceList()->getValues(); |
51 | 51 | if (!in_array($event->getData(), $values)) { |
@@ -17,7 +17,7 @@ |
||
17 | 17 | { |
18 | 18 | $Table = $schema->getTable('dtb_payment'); |
19 | 19 | if (!$Table->hasColumn('use_paypal')) { |
20 | - $Table->addColumn('use_paypal','smallint', [ |
|
20 | + $Table->addColumn('use_paypal', 'smallint', [ |
|
21 | 21 | 'notnull' => false, |
22 | 22 | 'default' => 0 |
23 | 23 | ]); |
@@ -16,7 +16,7 @@ |
||
16 | 16 | * @Security("has_role('ROLE_ADMIN')") |
17 | 17 | * |
18 | 18 | * @param Application $app |
19 | - * @return \Symfony\Component\HttpFoundation\Response |
|
19 | + * @return string |
|
20 | 20 | */ |
21 | 21 | public function testAdmin(Application $app) |
22 | 22 | { |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace Eccube2\Controller; |
4 | 4 | |
5 | 5 | use Eccube\Application; |
6 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache; |
|
7 | 6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
8 | 7 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; |
9 | 8 |