|
|
@@ -2,6 +2,7 @@ |
|
|
|
|
|
|
|
namespace Lc\CaracoleBundle\Definition\Field\User; |
|
|
|
|
|
|
|
use App\Entity\User\GroupUser; |
|
|
|
use EasyCorp\Bundle\EasyAdminBundle\Field\ChoiceField; |
|
|
|
use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField; |
|
|
|
use Lc\CaracoleBundle\Context\MerchantContextTrait; |
|
|
@@ -82,6 +83,7 @@ class UserFieldDefinition extends SovUserFieldDefinition |
|
|
|
->setSortable(true), |
|
|
|
'groupUsers' => AssociationField::new('groupUsers') |
|
|
|
->setFormTypeOption('choices', $groupUsers) |
|
|
|
->setCustomOption('class', GroupUser::class) |
|
|
|
->setTemplatePath('@LcSov/adminlte/crud/field/association_many.html.twig') |
|
|
|
->setFormTypeOption('choice_label', function ($choice) { |
|
|
|
return $choice->getTitle() . '[' . $choice->getMerchant() . ']'; |