mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
tp: adapt controller/entity/formtype to works with new ACL (TO BE CHECKED)
* rename type by types -> getTypes() getter * adapt controller to fix centers errors * remove voteOnAttribute return always true in voter
This commit is contained in:
@@ -64,10 +64,10 @@ class ThirdPartyType extends AbstractType
|
||||
}
|
||||
if (count($types) === 1) {
|
||||
$builder
|
||||
->add('type', HiddenType::class, [
|
||||
->add('types', HiddenType::class, [
|
||||
'data' => array_values($types)
|
||||
])
|
||||
->get('type')
|
||||
->get('types')
|
||||
->addModelTransformer(new CallbackTransformer(
|
||||
function (?array $typeArray): ?string {
|
||||
if (null === $typeArray) {
|
||||
@@ -84,7 +84,7 @@ class ThirdPartyType extends AbstractType
|
||||
))
|
||||
;
|
||||
} else {
|
||||
$builder->add('type', ChoiceType::class, [
|
||||
$builder->add('types', ChoiceType::class, [
|
||||
'choices' => $types,
|
||||
'expanded' => true,
|
||||
'multiple' => true,
|
||||
|
Reference in New Issue
Block a user