Category: sonata-media-bundle

Change sonata media upload directory programatically

I have a multisite using the package prodigious/symfony-multisite-bundle and each site has its own folder on images upload through sonata media. Uploading the image through the admin interface save the images in the right folder. filesystem: local: directory: “%kernel.root_dir%/../web/uploads/%kernel.name%/media” #non-flex…

Sonata Media Bundle – INVALID MODE

I am using Sonata Admin Bundle and Sonata Media Bundle. I use those versions. Symfony Version is 4.4.3 sonata-project/admin-bundle 3.58.0 The missing Symfony Admin Generator sonata-project/block-bundle 3.18.3 Symfony SonataBlockBundle sonata-project/cache 2.0.1 Cache library sonata-project/core-bundle 3.17.2 Symfony SonataCoreBundle (abandoned) sonata-project/datagrid-bundle 2.5.0…

Hide Sonata Media Admin from dashboard

I want to remove sonatamediaadmin from dashboard. I am using Compiler pass https://symfony.com/doc/4.4/service_container/compiler_passes.html Now I added the src/Kernel.php process function (of course with class Kernel extends BaseKernel implements CompilerPassInterface) public function process(ContainerBuilder $container) { // in this method you can…