Reindex the collections in CollectionType to prevent issues related of changing the order between the requests.

This commit is contained in:
Jan Böhmer 2020-04-01 15:10:06 +02:00
parent b3805277b9
commit f0a3e9b5af
6 changed files with 128 additions and 1 deletions

View file

@ -132,6 +132,7 @@ class BaseEntityAdminForm extends AbstractType
'allow_add' => true,
'allow_delete' => true,
'label' => false,
'reindex_enable' => true,
'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
'entry_options' => [
'data_class' => $options['attachment_class'],
@ -158,6 +159,7 @@ class BaseEntityAdminForm extends AbstractType
'allow_add' => $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
'allow_delete' => $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
'reindex_enable' => true,
'label' => false,
'by_reference' => false,
'prototype_data' => new $options['parameter_class'](),