Skip to content

Commit

Permalink
Merge pull request #125 from Runroom/hotfix/use-model-list-type
Browse files Browse the repository at this point in the history
  • Loading branch information
jordisala1991 committed Mar 2, 2022
2 parents ae937c0 + f3dd446 commit e4e813e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/seo-bundle/src/Admin/MetaInformationAdmin.php
Expand Up @@ -19,9 +19,9 @@
use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\AdminBundle\Form\Type\ModelListType;
use Sonata\AdminBundle\Route\RouteCollection;
use Sonata\AdminBundle\Route\RouteCollectionInterface;
use Sonata\MediaBundle\Form\Type\MediaType;
use Symfony\Component\Validator\Constraints as Assert;

/** @extends AbstractAdmin<MetaInformation> */
Expand Down Expand Up @@ -101,10 +101,13 @@ protected function configureFormFields(FormMapper $form): void
->with('Image', [
'box_class' => 'box box-solid box-primary',
])
->add('image', MediaType::class, [
->add('image', ModelListType::class, [
'required' => false,
'context' => 'default',
'provider' => 'sonata.media.provider.image',
], [
'link_parameters' => [
'context' => 'default',
'provider' => 'sonata.media.provider.image',
],
])
->end();
}
Expand Down

0 comments on commit e4e813e

Please sign in to comment.