Download the PHP package tweedegolf/media-bundle without Composer
On this page you can find all versions of the php package tweedegolf/media-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tweedegolf/media-bundle
More information about tweedegolf/media-bundle
Files in tweedegolf/media-bundle
Package media-bundle
Short Description Media manager bundle for Symfony and tinyMCE
License MIT
Informations about the package media-bundle
TweedeGolf MediaBundle
The TweedeGolf MediaBundle provides a ready-to-use media manager for your Symfony project. Although it is especially designed to work with tinyMCE, the media bundle could be used for several other purposes.
In essence, the TweedeGolf MediaBundle provides a File Entity and a controller that implements a JSON API for this entity
Dependencies
This repository only provides the Symfony bundle and can be installed via composer. The front-end scripts used to display the modal can be found on https://github.com/tweedegolf/media-browser and can be installed using bower.
Composer dependencies:
Bower dependencies:
Installation and configuration
A good starting point to setup a Symfony project with bower and gulp is the TweedeGolf Symfony Okoa Project.
Using Composer add the bundle to your requirements, running
composer require tweedegolf/media-bundle
.
For installation instructions of the media browser, see the repository.
Basic configuration
Define mappings in your configuration file config/packages/tweede_golf_media.yaml
(or app/config/config.yml
):
You can configure the maximum number of items displayed per page.
You must configure the name of your File entity.
This is an example of File entity you can define:
Also, the MediaBundle depends on some configurations in other bundles. There needs to be a VichUploader mapping defined with the name tgmedia_files
. Furthermore, there has to be a LiipImagine filter with the name tgmedia_thumbnail
.
A example configuration of these bundles is available in the documentation.
Add routes to your routing file
Ini config/routes.yaml
(or app/config/routing.yml
), add the routes for the media bundle api:
Make sure the path to the bundle matches the path specified in the javascript source when including the media browser. Thus /api
should match the firts part in the path speciefied when including the javascript source:
Add the bundle to your AppKernel
If you use Flex, you should already have bundles in config/bundles.php
:
If you still use old system, you need to manually add to app/AppKernel.php
:
All versions of media-bundle with dependencies
doctrine/doctrine-bundle Version ^1.2
doctrine/orm Version ^2.4
liip/imagine-bundle Version ^1.2
symfony/config Version ^2.7|^3.0|^4.0
symfony/dependency-injection Version ^2.7|^3.0|^4.0
symfony/event-dispatcher Version ^2.7|^3.0|^4.0
symfony/form Version ^2.7|^3.0|^4.0
symfony/http-kernel Version ^2.7|^3.0|^4.0
symfony/validator Version ^2.7|^3.0|^4.0
vich/uploader-bundle Version ^1.0