kai-grassnick / readable-path-bundle
This package is abandoned and no longer maintained.
No replacement package was suggested.
Extends the sonata media bundle with a possibility for readable image paths.
Package info
github.com/KaiGrassnick/ReadablePathBundle
Type:symfony-bundle
pkg:composer/kai-grassnick/readable-path-bundle
1.0.1
2017-10-16 00:23 UTC
Requires
- sonata-project/media-bundle: >=2.3
This package is not auto-updated.
Last update: 2020-06-12 00:08:29 UTC
README
Add a thumbnail-filter which allows us to use the image name as a readable path
To allow a new type, we have to overwrite the original FormatThumbnail function
Requirements
- Symfony
- SonataAdmin
How to install
- Add path to parameters.yml
sonata.media.thumbnail.format: "KaiGrassnick\ReadablePathBundle\Thumbnail\FormatThumbnail" - Add
new KaiGrassnick\ReadablePathBundle\KaiGrassnickReadablePathBundle()toAppKernel.php - Done! Now we have a new thumbnail format
How to use
$provider = $this->get("sonata.media.provider.image");
$provider->generatePublicUrl($media, 'readable');
License
- MIT
Credits
- Kai Grassnick