Skip to content

Commit

Permalink
DeliveryDurationType を EntityType に修正
Browse files Browse the repository at this point in the history
- テストのファイル名が DeliveryDateTypeTest.php になっているのを修正
- おそらく、3系から4系へバージョンアップした際の修正漏れ
  • Loading branch information
nanasess committed Apr 16, 2024
1 parent e44c828 commit 8f71bc2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Eccube/Form/Type/Master/DeliveryDurationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@

namespace Eccube\Form\Type\Master;

use Eccube\Form\Type\MasterType;
use Doctrine\ORM\EntityRepository;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\OptionsResolver;

Expand All @@ -30,6 +31,13 @@ public function configureOptions(OptionsResolver $resolver)
$resolver->setDefaults([
'class' => 'Eccube\Entity\DeliveryDuration',
'placeholder' => 'common.select__unspecified',
'multiple' => false,
'expanded' => false,
'required' => false,
'query_builder' => function (EntityRepository $er) {
return $er->createQueryBuilder('m')
->orderBy('m.sort_no', 'ASC');
},
]);
}

Expand All @@ -46,6 +54,6 @@ public function getBlockPrefix()
*/
public function getParent()
{
return MasterType::class;
return EntityType::class;
}
}

0 comments on commit 8f71bc2

Please sign in to comment.