|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(is_null($this->productFamilyArray)) { |
|
|
if(is_null($this->productFamilyArray)) { |
|
|
$this->productFamilyArray = $this->productFamilyStore->setMerchant($this->merchant)->get(); |
|
|
|
|
|
|
|
|
$this->productFamilyArray = $this->productFamilyStore->setMerchant($this->merchant)->getOnlineAndOffline(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(is_null($this->productCategoryArray)) { |
|
|
if(is_null($this->productCategoryArray)) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'usersActive' => BooleanField::new('usersActive')->setFormTypeOption('mapped', false), |
|
|
'usersActive' => BooleanField::new('usersActive')->setFormTypeOption('mapped', false), |
|
|
|
|
|
|
|
|
'users' => AssociationField::new('users') |
|
|
|
|
|
|
|
|
'users' => /*ChoiceField::new('users') |
|
|
|
|
|
->setChoices([null]) |
|
|
|
|
|
->setTemplatePath('@LcSov/adminlte/crud/field/association_many.html.twig') |
|
|
|
|
|
->setFormTypeOption('attr', [ |
|
|
|
|
|
'data-ajax' => json_encode([ |
|
|
|
|
|
'url' => $this->urlGenerator->generate('app_admin_ajax_users'), |
|
|
|
|
|
'dataType' => 'json' |
|
|
|
|
|
]) |
|
|
|
|
|
]),*/ |
|
|
|
|
|
AssociationField::new('users') |
|
|
->setTemplatePath('@LcSov/adminlte/crud/field/association_many.html.twig') |
|
|
->setTemplatePath('@LcSov/adminlte/crud/field/association_many.html.twig') |
|
|
->setFormTypeOption('choices', $this->usersArray) |
|
|
->setFormTypeOption('choices', $this->usersArray) |
|
|
->setFormTypeOption( |
|
|
->setFormTypeOption( |
|
|
|
|
|
|
|
|
return ['data-group-users' => json_encode($data)]; |
|
|
return ['data-group-users' => json_encode($data)]; |
|
|
}, |
|
|
}, |
|
|
), |
|
|
), |
|
|
|
|
|
|
|
|
/*ChoiceField::new('users') |
|
|
|
|
|
->setChoices([null]) |
|
|
|
|
|
->setTemplatePath('@LcSov/adminlte/crud/field/association_many.html.twig') |
|
|
|
|
|
->setFormTypeOption('attr', [ |
|
|
|
|
|
'data-ajax' => json_encode([ |
|
|
|
|
|
'url' => $this->urlGenerator->generate('app_admin_ajax_users'), |
|
|
|
|
|
'dataType' => 'json' |
|
|
|
|
|
]) |
|
|
|
|
|
]),*/ |
|
|
|
|
|
'productCategoriesActive' => BooleanField::new('productCategoriesActive')->setFormTypeOption('mapped', false), |
|
|
'productCategoriesActive' => BooleanField::new('productCategoriesActive')->setFormTypeOption('mapped', false), |
|
|
'productCategories' => AssociationField::new('productCategories') |
|
|
'productCategories' => AssociationField::new('productCategories') |
|
|
->setTemplatePath('@LcSov/adminlte/crud/field/association_many.html.twig') |
|
|
->setTemplatePath('@LcSov/adminlte/crud/field/association_many.html.twig') |