| @@ -274,7 +274,7 @@ | ||
| 274 | 274 |              $multi = preg_match('/^\d+$/', $searchData['multi']) ? $searchData['multi'] : null; | 
| 275 | 275 | $qb | 
| 276 | 276 |                  ->andWhere('o.id = :multi OR o.name01 LIKE :likemulti OR o.name02 LIKE :likemulti OR ' . | 
| 277 | - 'o.kana01 LIKE :likemulti OR o.kana02 LIKE :likemulti OR o.company_name LIKE :likemulti') | |
| 277 | + 'o.kana01 LIKE :likemulti OR o.kana02 LIKE :likemulti OR o.company_name LIKE :likemulti') | |
| 278 | 278 |                  ->setParameter('multi', $multi) | 
| 279 | 279 |                  ->setParameter('likemulti', '%' . $searchData['multi'] . '%'); | 
| 280 | 280 | } | 
| @@ -55,10 +55,10 @@ discard block | ||
| 55 | 55 |          if(PluginEventHandler::EVENT_HANDLER_TYPE_FIRST==$type){ | 
| 56 | 56 | $range_start=PluginEventHandler::EVENT_PRIORITY_FIRST_START; | 
| 57 | 57 | $range_end=PluginEventHandler::EVENT_PRIORITY_FIRST_END; | 
| 58 | -        }elseif(PluginEventHandler::EVENT_HANDLER_TYPE_LAST==$type){ | |
| 58 | +        } elseif(PluginEventHandler::EVENT_HANDLER_TYPE_LAST==$type){ | |
| 59 | 59 | $range_start=PluginEventHandler::EVENT_PRIORITY_LAST_START; | 
| 60 | 60 | $range_end=PluginEventHandler::EVENT_PRIORITY_LAST_END; | 
| 61 | -        }else{ | |
| 61 | +        } else{ | |
| 62 | 62 | $range_start=PluginEventHandler::EVENT_PRIORITY_NORMAL_START; | 
| 63 | 63 | $range_end=PluginEventHandler::EVENT_PRIORITY_NORMAL_END; | 
| 64 | 64 | } | 
| @@ -82,7 +82,7 @@ discard block | ||
| 82 | 82 | $result=$qb->getQuery()->getResult(); | 
| 83 | 83 |          if(count($result)){ | 
| 84 | 84 | return $result[0]->getPriority() -1; | 
| 85 | -        }else{ | |
| 85 | +        } else{ | |
| 86 | 86 | return $range_start; | 
| 87 | 87 | } | 
| 88 | 88 | |
| @@ -119,7 +119,7 @@ discard block | ||
| 119 | 119 | $em->flush(); | 
| 120 | 120 | $em->getConnection()->commit(); | 
| 121 | 121 | # 移動する | 
| 122 | -        }else{ | |
| 122 | +        } else{ | |
| 123 | 123 | # 移動しない | 
| 124 | 124 |              throw new PluginException("Can't swap"); | 
| 125 | 125 | } | 
| @@ -73,17 +73,17 @@ discard block | ||
| 73 | 73 | |
| 74 | 74 |          $qb = $this->createQueryBuilder('e'); | 
| 75 | 75 |          $qb->andWhere("e.priority >= $range_end ") | 
| 76 | -           ->andWhere("e.priority <= $range_start ") | |
| 77 | -           ->andWhere('e.event = :event') | |
| 78 | -           ->setParameter('event',$event) | |
| 79 | - ->setMaxResults(1) | |
| 80 | -           ->orderBy('e.priority','ASC'); | |
| 76 | +            ->andWhere("e.priority <= $range_start ") | |
| 77 | +            ->andWhere('e.event = :event') | |
| 78 | +            ->setParameter('event',$event) | |
| 79 | + ->setMaxResults(1) | |
| 80 | +            ->orderBy('e.priority','ASC'); | |
| 81 | 81 | |
| 82 | 82 | $result=$qb->getQuery()->getResult(); | 
| 83 | 83 |          if(count($result)){ | 
| 84 | - return $result[0]->getPriority() -1; | |
| 84 | + return $result[0]->getPriority() -1; | |
| 85 | 85 |          }else{ | 
| 86 | - return $range_start; | |
| 86 | + return $range_start; | |
| 87 | 87 | } | 
| 88 | 88 | |
| 89 | 89 | } | 
| @@ -96,13 +96,13 @@ discard block | ||
| 96 | 96 |          $qb = $this->createQueryBuilder('e'); | 
| 97 | 97 | |
| 98 | 98 |          $qb->andWhere("e.priority >= $range_end ") | 
| 99 | -           ->andWhere("e.priority <= $range_start ") | |
| 100 | -           ->andWhere('e.priority '.($up ?  '>' : '<' ).' :pri') | |
| 101 | -           ->andWhere('e.event = :event') | |
| 102 | -           ->setParameter('event',$pluginEventHandler->getEvent()) | |
| 103 | -           ->setParameter('pri',  $pluginEventHandler->getPriority()  ) | |
| 104 | - ->setMaxResults(1) | |
| 105 | -           ->orderBy('e.priority', ($up ? 'ASC':'DESC' )  ); | |
| 99 | +            ->andWhere("e.priority <= $range_start ") | |
| 100 | +            ->andWhere('e.priority '.($up ?  '>' : '<' ).' :pri') | |
| 101 | +            ->andWhere('e.event = :event') | |
| 102 | +            ->setParameter('event',$pluginEventHandler->getEvent()) | |
| 103 | +            ->setParameter('pri',  $pluginEventHandler->getPriority()  ) | |
| 104 | + ->setMaxResults(1) | |
| 105 | +            ->orderBy('e.priority', ($up ? 'ASC':'DESC' )  ); | |
| 106 | 106 | |
| 107 | 107 | $result=$qb->getQuery()->getResult(); | 
| 108 | 108 | |
| @@ -138,7 +138,7 @@ | ||
| 138 | 138 | 'allow_add' => true, | 
| 139 | 139 | 'allow_delete' => true, | 
| 140 | 140 | 'data' => $ProductClasses, | 
| 141 | - )); | |
| 141 | + )); | |
| 142 | 142 | |
| 143 | 143 | $event = new EventArgs( | 
| 144 | 144 | array( | 
| @@ -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 | /** | 
| @@ -18,8 +18,8 @@ | ||
| 18 | 18 | $config->setMigrationsTableName(self::MIGRATION_TABLE_PREFIX.$pluginCode); | 
| 19 | 19 | $migration = new Migration($config); | 
| 20 | 20 | $migration->setNoMigrationException(true); | 
| 21 | - // null 又は 'last' を渡すと最新バージョンまでマイグレートする | |
| 22 | - // 0か'first'を渡すと最初に戻る | |
| 21 | + // null 又は 'last' を渡すと最新バージョンまでマイグレートする | |
| 22 | + // 0か'first'を渡すと最初に戻る | |
| 23 | 23 | $migration->migrate($version, false); | 
| 24 | 24 | |
| 25 | 25 | |
| @@ -56,7 +56,7 @@ | ||
| 56 | 56 |              $multi = preg_match('/^\d+$/', $searchData['multi']) ? $searchData['multi'] : null; | 
| 57 | 57 | $qb | 
| 58 | 58 |                  ->andWhere('s.id = :multi OR s.name01 LIKE :likemulti OR s.name02 LIKE :likemulti OR ' . | 
| 59 | - 's.kana01 LIKE :likemulti OR s.kana02 LIKE :likemulti OR s.company_name LIKE :likemulti') | |
| 59 | + 's.kana01 LIKE :likemulti OR s.kana02 LIKE :likemulti OR s.company_name LIKE :likemulti') | |
| 60 | 60 |                  ->setParameter('multi', $multi) | 
| 61 | 61 |                  ->setParameter('likemulti', '%' . $searchData['multi'] . '%'); | 
| 62 | 62 | } | 
| @@ -59,7 +59,6 @@ | ||
| 59 | 59 |      { | 
| 60 | 60 | } | 
| 61 | 61 | /** | 
| 62 | - | |
| 63 | 62 |       * {@inheritdoc} | 
| 64 | 63 | */ | 
| 65 | 64 | public function buildForm(FormBuilderInterface $builder, array $options) | 
| @@ -1,6 +1,6 @@ discard block | ||
| 1 | 1 | <?php return [ | 
| 2 | - 'http_cache' => | |
| 3 | - [ | |
| 2 | + 'http_cache' => | |
| 3 | + [ | |
| 4 | 4 | 'enabled' => false, | 
| 5 | 5 | 'age' => 10, | 
| 6 | 6 | // フロントでキャッシュを適用させる画面のrouteを設定 | 
| @@ -17,5 +17,5 @@ discard block | ||
| 17 | 17 | // 'help_tradelaw', | 
| 18 | 18 | // 'help_agreement', | 
| 19 | 19 | ], | 
| 20 | - ], | |
| 20 | + ], | |
| 21 | 21 | ]; | 
| @@ -60,7 +60,7 @@ | ||
| 60 | 60 | */ | 
| 61 | 61 | protected $appConfig; | 
| 62 | 62 | |
| 63 | - /** | |
| 63 | + /** | |
| 64 | 64 | * get query builder. | 
| 65 | 65 | * | 
| 66 | 66 | * @param array $searchData |