Download the PHP package solenegk/artgris-media without Composer
On this page you can find all versions of the php package solenegk/artgris-media. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package artgris-media
Umanit/MediaBundle - Easier Symfony Media Management
This repository is a fork of artgris/MediaBundle. It has not been tested out of the project is has been created for. The documentation below is a copy of the original one.
Prerequisites
- symfony >= 5.4
- artgris/FileManagerBundle
- Assets:
- CSS: bootstrap 4 or 5 and Font Awesome
- JS: jQuery, ninsuo/symfony-collection and jQuery UI

Getting Started
-
Download the files:
composer require artgris/media-bundle -
In
AppKernel.phpadd the bundle:new Artgris\Bundle\MediaBundle\ArtgrisMediaBundle() -
Then, run the following command:
php bin/console assets:install -
In your twig template, you will then need to import the required assets:
- CSS (requires bootstrap and Font Awesome):
-
JS (requires jQuery, ninsuo/symfony-collection and jQuery UI):
- In
routing.yml, you will need to import the Ajax route:
Usage
In an entity, add the path attributes as string.
You can also use doctrine's types such as simple_array, array, json for collections.
Then, use a form builder and assigne the MediaType class for a single file, or the MediaCollectionType for multiple files.
Options:
MediaType:
'conf' => 'yourconf'(required) specifies a configuration defined in the FileManager. For more informations about media configurations, refer to FileManagerBundle's documentation'extra' => [](only with FileManagerBundle Service Configuration) Extra Url parameters injections'readonly' => falseprevents the user from manually changing the path (it only adds a "readonly" attribute to the corresponding HTML input)'allow_crop' => trueallows the user to edit the image using fengyuanchen/cropper'crop_options' => arrayifallow_cropis set totrue, allows to specify extra crop options. The default options:
MediaCollectionType:
'conf' => 'yourconf'(required) specifies a configuration defined in the FileManager. For more informations about media configurations, refer to FileManagerBundle's documentation
Some ninsuo/symfony-collection's options are available directly:
'min' => 0'max' => 100'init_with_n_elements' => 1'add_at_the_end' => true
Like regular collections, you can edit entries options, i.e to enable alts:
Changing cropping path
add config/packages/artgris_media.yaml
artgris_media:
cropped_path: "cropped/" #default value
Demo Application
MediaBundleDemo is a complete Symfony application created to showcase MediaBundle features.
All versions of artgris-media with dependencies
doctrine/orm Version ^3.5
doctrine/doctrine-bundle Version ^1.8|^2.0
gregwar/image Version 2.*
artgris/filemanager-bundle Version 2.*