linestorm / media-bundle
Media Bundle for symfony 2.3
Requires
- php: >=5.3.0
- linestorm/linestorm-cms: dev-master
- symfony/symfony: >=2.3
This package is auto-updated.
Last update: 2020-04-10 17:18:27 UTC
README
The Media Module Bundle for LineStorm CMS provides image management for the CMS
Installation
- Download bundle using composer
- Enable the Bundle
- Configure the Bundle
- Installing Assets
- Configuring Assets
Step 1: Download bundle using composer
Add linestorm/media-bundle
to your composer.json
file, or download it by running the command:
$ php composer.phar require linestorm/media-bundle
Step 2: Enable the bundle
Enable the media bundle in the app/AppKernel.php
:
public function registerBundles() { $bundles = array( // ... new LineStorm\MediaBundle\MediaBundle(), ); }
Step 3: Configure the Bundle
Add the default media provider in the linestorm_cms_media
namespace inside the app/config/config.yml
file. The default
is local_storeage
line_storm_media: default_provider: local_storeage
If you want to use local_storage
, you will need to add it to your Resources/config/services.yml
file:
parameters: linestorm.cms.media_provider.local_storeage.entity.class: Acme\DemoBundle\Entity\Media services: linestorm.cms.media_provider.local_storeage: class: LineStorm\MediaBundle\Media\LocalStorageMediaProvider arguments: - @doctrine.orm.default_entity_manager - %linestorm.cms.media_provider.local_storeage.entity.class% - @security.context - /path/to/store/directory/ - /web/path/ tags: - { name: linestorm.cms.media_provider }
See Creating a media provder for creating your own provider.
Step 4: Installing Assets
###Bower Add .bower.json to the dependencies
###Manual Download the modules in .bower.json to your assets folder
Step 5: Configuring Assets
You will need to add these dependency paths to your requirejs config:
requirejs.config({ paths: { // ... // cms media library cms_media: '/path/to/bundles/linestormmedia/js/media', cms_media_list: '/path/to/bundles/linestormmedia/js/list' } });