From 20b5e6138be834be495297973baf3470d1e6b6ed Mon Sep 17 00:00:00 2001 From: Albert Ganiev Date: Mon, 16 Feb 2015 15:29:21 +1000 Subject: [PATCH] conv to unix --- README.md | 1166 ++++++++++++++++++++++++++--------------------------- 1 file changed, 583 insertions(+), 583 deletions(-) diff --git a/README.md b/README.md index 31fb37f..d377edd 100644 --- a/README.md +++ b/README.md @@ -1,583 +1,583 @@ -FMElfinderBundle -================ - -[ElFinder](https://github.com/Studio-42/elFinder) integration in Symfony2 - -[![Build Status](https://secure.travis-ci.org/helios-ag/FMElfinderBundle.png)](http://travis-ci.org/helios-ag/FMElfinderBundle) -[![SensioLabsInsight](https://insight.sensiolabs.com/projects/604032ab-06ef-4ee2-b0cf-bb5240b9cd17/mini.png)](https://insight.sensiolabs.com/projects/604032ab-06ef-4ee2-b0cf-bb5240b9cd17) -[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/helios-ag/fmelfinderbundle/trend.png)](https://bitdeli.com/free "Bitdeli Badge") -[![Dependency Status](https://www.versioneye.com/user/projects/53db56ae4b3ac897b60001d4/badge.svg?style=flat)](https://www.versioneye.com/user/projects/53db56ae4b3ac897b60001d4) - -[![Latest Stable Version](https://poser.pugx.org/helios-ag/fm-elfinder-bundle/v/stable.svg)](https://packagist.org/packages/helios-ag/fm-elfinder-bundle) [![Total Downloads](https://poser.pugx.org/helios-ag/fm-elfinder-bundle/downloads.svg)](https://packagist.org/packages/helios-ag/fm-elfinder-bundle) [![Latest Unstable Version](https://poser.pugx.org/helios-ag/fm-elfinder-bundle/v/unstable.svg)](https://packagist.org/packages/helios-ag/fm-elfinder-bundle) [![License](https://poser.pugx.org/helios-ag/fm-elfinder-bundle/license.svg)](https://packagist.org/packages/helios-ag/fm-elfinder-bundle) - -elFinder is an open-source file manager for web, written in JavaScript using jQuery UI. -Creation is inspired by simplicity and convenience of Finder program used in Mac OS X operating system. - -Recommended bundles to use with: - -* [TinymceBundle](https://github.com/stfalcon/TinymceBundle/) -* [IvoryCKEditorBundle](https://github.com/egeloen/IvoryCKEditorBundle/) -* [TrsteelCkeditorBundle](https://github.com/trsteel88/TrsteelCkeditorBundle) - - -- [Installation](#installation) - - [Step 1: Installation](#step-1-installation) - - [Step 2: Enable the bundle](#step-2-enable-the-bundle) - - [Step 3: Import FMElfinderBundle routing file](#step-3-import-fmelfinderbundle-routing-file) - - [Step 4: Securing paths](#step-4-configure-your-applications-securityyml) - - [Step 5: Install assets](#step-5-install-assets) -- [Basic configuration](#basic-configuration) - - [Add configuration options to your config.yml](#add-configuration-options-to-your-configyml) - - [Use multiple upload folder by instance](#use-multiple-upload-folder-by-instance) -- [CORS support](#cors-support) -- [Elfinder Form Type](#elfinder-form-type) -- [CKEditor integration](#ckeditor-integration) - - [Installation](#step-1-installation) - - [Configuration](#step-2-configure-ckeditor-setting-via-settingsyml-or-through-form-builder) -- [TinyMCE integration](#tinymce-integration) - - [Integration with TinyMCE 3](#tinymce-3x) - - [Integration with TinyMCE 4](#tinymce-4x) -- [Advanced configuration](#advanced-configuration) - - [Custom configuration provider](#custom-configuration-provider) - - [Custom loader](#custom-loader) - - [Plugins support](#plugins-support) - - [Service as volume driver](#symfony-service-as-a-volume-driver) -- [Changelog](#changelog) - -## Installation - -To install this bundle, you'll need both the lib [ElFinderPHP](https://github.com/helios-ag/ElFinderPHP) -and this bundle. - -This instruction explain how to setup bundle on Symfony 2.1 and newer - -### Step 1: Installation - -Install legacy version of the bundle ([documentation](https://github.com/helios-ag/FMElfinderBundle/blob/1.0/README.md)): - - -```sh - composer require helios-ag/fm-elfinder-bundle: "~1.5" -``` - - -For Symfony between 2.1 and 2.3 (2.3 included) use version ~2.3 - - -```sh - composer require helios-ag/fm-elfinder-bundle: "~2.3" -``` - - -For Symfony 2.4 and later use version 3 - - -```sh - composer require helios-ag/fm-elfinder-bundle -``` - - -Now tell composer to download the bundle by running the command: - - -```sh - composer update helios-ag/fm-elfinder-bundle -``` - -### Step 2: Enable the bundle - -Enable the bundle in the kernel: - -``` php - , that provide -elfinder callback (opens Elfinder window), configuration for this form type is simple -First, define instance with editor set to "form": -``` -fm_elfinder: - instances: - form: - locale: %locale% # defaults to current request locale - editor: form # other choices are tinymce or simple, and form - showhidden: false # defaults to false - fullscreen: true # defaults true, applies to simple and ckeditor editors - include_assets: true # disable if you want to handle loading of the javascript and css assets yourself - compression: false # enable if you configured the uglifycss and uglifyjs2 assetic filters and want compression - connector: - debug: false # defaults to false - roots: # at least one root must be defined - uploads: - driver: LocalFileSystem - path: uploads - upload_allow: ['image/png', 'image/jpg', 'image/jpeg'] - upload_deny: ['all'] - upload_max_size: 2M -``` - -On second step, add to your form builder (or form class), elfinder type, and pass instance and `enable` parameters: - -```php -$form = $this->createFormBuilder() - ->add('elfinder','elfinder', array('instance'=>'form', 'enable'=>true)) - ->getForm(); -``` - -Render form with twig as usual: -```jinja -
- {{ form_widget(form) }} - -
-``` - -## CKEditor integration - -Mostly filebrowsers used with WYSIWYG editors to upload images and other files. There are two bundles to work with CKEditor -available: [TrsteelCKEditorBundle](https://github.com/trsteel88/TrsteelCkeditorBundle) and [IvoryCKEditorBundle](https://github.com/egeloen/IvoryCKEditorBundle) -Both will work with this bundle. - -**Step 1: Installation** - -Install both bundles according README files - -**Step 2: Configure CKEditor setting via settings.yml or through form builder:** - -```yaml -trsteel_ckeditor: - ... - filebrowser_image_browse_url: - route: elfinder - route_parameters: - instance: ckeditor -``` - -or if you prefer Ivory CKEditor Bundle - -```yaml -ivory_ck_editor: - default_config: default - configs: - default: - filebrowserBrowseRoute: elfinder - filebrowserBrowseRouteParameters: - instance: ckeditor - -``` - -Note that instance name should be the same as configured in elfinder bundle - -```php - -createFormBuilder() - ->add('content', 'ckeditor', array( - 'config' => array( - 'filebrowser_image_browse_url' => array( - 'route' => 'elfinder', - 'route_parameters' => array('instance' => 'ckeditor'), - ), - ), - )) - ->getForm() -; -``` - -ElFinder will be available under Insert Image dialog - -## TinyMCE integration - -You can integrate TinyMCE byself or use Bundles that already add TinyMCE functionality to your Symfony project. -Below instruction how to integrate [FMElfinderBundle](https://github.com/helios-ag/FMElfinderBundle) with [TinyMCEBundle](https://github.com/stfalcon/TinymceBundle) - -How to use ElfinderBundle with [TinyMCEBundle](https://github.com/stfalcon/TinymceBundle) - -### TinyMCE 3.x -Instruction for version 0.2.1 (TinyMCE 3.x) -Download bundles, configure, dump and install assets as written in installation steps - -**Configuration** - -Update the editor property in your app/config.yml -Set TinyMce popup path: -```yaml -fm_elfinder: - editor: tinymce - tinymce_popup_path: "asset[bundles/stfalcontinymce/vendor/tiny_mce/tiny_mce_popup.js]" -``` -Under tinymce configuration node, theme configuration, add: -file_browser_callback : 'elFinderBrowser' - -```yaml -stfalcon_tinymce: - theme: - simple: - file_browser_callback : 'elFinderBrowser' -``` - -after ( {{ tinymce_init() }} ) function call -place ElfinderBundle's function: - -```jinja -{{ elfinder_tinymce_init('instance_name', {'width':'900', 'height': '450', 'title':'ElFinder 2.0'}) }} -``` - -as shown below - -```jinja -{{ tinymce_init() }} -{{ elfinder_tinymce_init('instance_name') }} -``` - -instance_name is an instance of elfinder's configuration - -### TinyMCE 4.x - -Update the editor property in your app/config.yml - -```yaml - fm_elfinder: - editor: tinymce4 -``` - -Under tinymce configuration node, theme configuration, add: -file_browser_callback : elFinderBrowser - -```yaml -stfalcon_tinymce: - theme: - simple: - file_browser_callback : elFinderBrowser -``` - -before ( {{ tinymce_init() }} ) function call (order is important) -place ElfinderBundle's function: -{{ elfinder_tinymce_init4('instance_name', {'width':'900', 'height': '450', 'title':'ElFinder 2.0'} ) }} -as shown below - -```jinja - {{ elfinder_tinymce_init4('instance_name') }} - {{ tinymce_init() }} -``` - -instance_name is instance of elfinder's configuration - -# Advanced configuration - -## Custom configuration provider - -ElFinder bundle allows to override his configuration provider service: - -```yaml -fm_elfinder: - configuration_provider: elfinder.configurator -``` -where 'elfinder.configurator' is default ElFinder's bundle service to read configuration from DIC - -To override service, simply define your own service: -```yaml -services: - my_elfinder_configurator: - class: Acme\DemoBundle\MyElfinderConfigurator - arguments: ["%my_arguments%"] -``` - -Configuration class must implement ElFinderConfigurationProviderInterface - -method getConfiguration($instance) should return array of parameters compatible with ElFinder bundle configuration - -## Custom loader - -It is possible to override loader service with your own class: - -```yaml -services: - my_loader: - class: AppBundle\Service\MyElFinderLoader - arguments: [@fm_elfinder.configurator] - -fm_elfinder: - loader: my_loader -``` -## Plugins - -ElFinder comes with few plugins, like auto-resize, which can be enabled, by the following configuration: - -```yaml -fm_elfinder: - instances: - tinymce: - locale: %locale% - editor: tinymce4 - include_assets: true - relative_path: true - fullscreen: true - connector: - debug: true # defaults to false - bind: - upload.presave: - - Plugin.AutoResize.onUpLoadPreSave - plugin: - AutoResize: # global resize options, applies to root which don't have his own resize configuraion - enable: true - maxWidth: 750 - maxHeight: 750 - quality: 95 # JPEG image save quality - roots: # at least one root must be defined - uploads: - driver: LocalFileSystem - path: uploads - plugin: - AutoResize: - enable: true - maxWidth: 500 - maxHeight: 500 - quality: 95 # JPEG image save quality - upload_allow: ['image/png', 'image/jpg', 'image/jpeg'] - upload_deny: ['all'] - upload_max_size: 2M - resize1: - driver: LocalFileSystem - path: uploads - plugin: - AutoResize: - enable: true # For control by volume driver - maxWidth: 800 # Path to Water mark image - maxHeight: 800 # Margin right pixel - quality: 95 # JPEG image save quality - upload_allow: ['image/png', 'image/jpg', 'image/jpeg'] - upload_deny: ['all'] - upload_max_size: 2M - resize2: - driver: LocalFileSystem - path: uploads - plugin: - AutoResize: - enable: true - maxWidth: 800 - maxHeight: 800 - quality: 95 - upload_allow: ['image/png', 'image/jpg', 'image/jpeg'] - upload_deny: ['all'] - upload_max_size: 2M -``` - -ElFinder comes with other plugins, check Plugins folder under ElFinderPHP for more information. - -## Symfony service as a volume driver - -volumeDriver can be declared as Symfony service -The service should however be an instance of the FM\ElFinderPHP\Driver\ElFinderVolumeDriver class. This check is to -ensure the service is a valid ElFinder VolumeDriver. - -To configure a root with a service-driver you can simply use the service id as the drive key: - -``` -fm_elfinder: - connector: - roots: - uploads: - driver: elfinder.driver.filesystem - path: uploads -``` - -This means that if you add the service definition: - -```xml - -``` - -# Changelog - -### 4.0 -* CORS support -* Flysystem driver support - -### 3.4 -* Custom template renderer - -### 3.3 -* Plugins support - -### 3.2 -* Assetic support removed - -### 3.1 -* Plugins support - -### 3.0 -* BC in public api (controllers showAction method with second parameter) - -### 2.5 -* Version with Request_stack - -### 2.3.3 -* Assetic support removed - -### 2.3.2 -* Multiple form types on the same page - -### 2.3 -* Version for the LTS Symfony (2.3.x) (without RequestStack usage) - -### 2.1 -* New Elfinder form type, provides basic field with Elfinder callback - -### 2.0 -* Multiple instances of elfinder configuration (allows multiple editors in one project, with different elfinder configurations) - -### 1.4 -* Dropped YUI compression support. -* Uglify JS/CSS optional compression. - -### 1.3 -* TinyMCE 4 integration -* Added link to IvoryCKEditorBundle in Readme -* Minor improvements -* Readme TOC - - - - - +FMElfinderBundle +================ + +[ElFinder](https://github.com/Studio-42/elFinder) integration in Symfony2 + +[![Build Status](https://secure.travis-ci.org/helios-ag/FMElfinderBundle.png)](http://travis-ci.org/helios-ag/FMElfinderBundle) +[![SensioLabsInsight](https://insight.sensiolabs.com/projects/604032ab-06ef-4ee2-b0cf-bb5240b9cd17/mini.png)](https://insight.sensiolabs.com/projects/604032ab-06ef-4ee2-b0cf-bb5240b9cd17) +[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/helios-ag/fmelfinderbundle/trend.png)](https://bitdeli.com/free "Bitdeli Badge") +[![Dependency Status](https://www.versioneye.com/user/projects/53db56ae4b3ac897b60001d4/badge.svg?style=flat)](https://www.versioneye.com/user/projects/53db56ae4b3ac897b60001d4) + +[![Latest Stable Version](https://poser.pugx.org/helios-ag/fm-elfinder-bundle/v/stable.svg)](https://packagist.org/packages/helios-ag/fm-elfinder-bundle) [![Total Downloads](https://poser.pugx.org/helios-ag/fm-elfinder-bundle/downloads.svg)](https://packagist.org/packages/helios-ag/fm-elfinder-bundle) [![Latest Unstable Version](https://poser.pugx.org/helios-ag/fm-elfinder-bundle/v/unstable.svg)](https://packagist.org/packages/helios-ag/fm-elfinder-bundle) [![License](https://poser.pugx.org/helios-ag/fm-elfinder-bundle/license.svg)](https://packagist.org/packages/helios-ag/fm-elfinder-bundle) + +elFinder is an open-source file manager for web, written in JavaScript using jQuery UI. +Creation is inspired by simplicity and convenience of Finder program used in Mac OS X operating system. + +Recommended bundles to use with: + +* [TinymceBundle](https://github.com/stfalcon/TinymceBundle/) +* [IvoryCKEditorBundle](https://github.com/egeloen/IvoryCKEditorBundle/) +* [TrsteelCkeditorBundle](https://github.com/trsteel88/TrsteelCkeditorBundle) + + +- [Installation](#installation) + - [Step 1: Installation](#step-1-installation) + - [Step 2: Enable the bundle](#step-2-enable-the-bundle) + - [Step 3: Import FMElfinderBundle routing file](#step-3-import-fmelfinderbundle-routing-file) + - [Step 4: Securing paths](#step-4-configure-your-applications-securityyml) + - [Step 5: Install assets](#step-5-install-assets) +- [Basic configuration](#basic-configuration) + - [Add configuration options to your config.yml](#add-configuration-options-to-your-configyml) + - [Use multiple upload folder by instance](#use-multiple-upload-folder-by-instance) +- [CORS support](#cors-support) +- [Elfinder Form Type](#elfinder-form-type) +- [CKEditor integration](#ckeditor-integration) + - [Installation](#step-1-installation) + - [Configuration](#step-2-configure-ckeditor-setting-via-settingsyml-or-through-form-builder) +- [TinyMCE integration](#tinymce-integration) + - [Integration with TinyMCE 3](#tinymce-3x) + - [Integration with TinyMCE 4](#tinymce-4x) +- [Advanced configuration](#advanced-configuration) + - [Custom configuration provider](#custom-configuration-provider) + - [Custom loader](#custom-loader) + - [Plugins support](#plugins-support) + - [Service as volume driver](#symfony-service-as-a-volume-driver) +- [Changelog](#changelog) + +## Installation + +To install this bundle, you'll need both the lib [ElFinderPHP](https://github.com/helios-ag/ElFinderPHP) +and this bundle. + +This instruction explain how to setup bundle on Symfony 2.1 and newer + +### Step 1: Installation + +Install legacy version of the bundle ([documentation](https://github.com/helios-ag/FMElfinderBundle/blob/1.0/README.md)): + + +```sh + composer require helios-ag/fm-elfinder-bundle: "~1.5" +``` + + +For Symfony between 2.1 and 2.3 (2.3 included) use version ~2.3 + + +```sh + composer require helios-ag/fm-elfinder-bundle: "~2.3" +``` + + +For Symfony 2.4 and later use version 3 + + +```sh + composer require helios-ag/fm-elfinder-bundle +``` + + +Now tell composer to download the bundle by running the command: + + +```sh + composer update helios-ag/fm-elfinder-bundle +``` + +### Step 2: Enable the bundle + +Enable the bundle in the kernel: + +``` php + , that provide +elfinder callback (opens Elfinder window), configuration for this form type is simple +First, define instance with editor set to "form": +``` +fm_elfinder: + instances: + form: + locale: %locale% # defaults to current request locale + editor: form # other choices are tinymce or simple, and form + showhidden: false # defaults to false + fullscreen: true # defaults true, applies to simple and ckeditor editors + include_assets: true # disable if you want to handle loading of the javascript and css assets yourself + compression: false # enable if you configured the uglifycss and uglifyjs2 assetic filters and want compression + connector: + debug: false # defaults to false + roots: # at least one root must be defined + uploads: + driver: LocalFileSystem + path: uploads + upload_allow: ['image/png', 'image/jpg', 'image/jpeg'] + upload_deny: ['all'] + upload_max_size: 2M +``` + +On second step, add to your form builder (or form class), elfinder type, and pass instance and `enable` parameters: + +```php +$form = $this->createFormBuilder() + ->add('elfinder','elfinder', array('instance'=>'form', 'enable'=>true)) + ->getForm(); +``` + +Render form with twig as usual: +```jinja +
+ {{ form_widget(form) }} + +
+``` + +## CKEditor integration + +Mostly filebrowsers used with WYSIWYG editors to upload images and other files. There are two bundles to work with CKEditor +available: [TrsteelCKEditorBundle](https://github.com/trsteel88/TrsteelCkeditorBundle) and [IvoryCKEditorBundle](https://github.com/egeloen/IvoryCKEditorBundle) +Both will work with this bundle. + +**Step 1: Installation** + +Install both bundles according README files + +**Step 2: Configure CKEditor setting via settings.yml or through form builder:** + +```yaml +trsteel_ckeditor: + ... + filebrowser_image_browse_url: + route: elfinder + route_parameters: + instance: ckeditor +``` + +or if you prefer Ivory CKEditor Bundle + +```yaml +ivory_ck_editor: + default_config: default + configs: + default: + filebrowserBrowseRoute: elfinder + filebrowserBrowseRouteParameters: + instance: ckeditor + +``` + +Note that instance name should be the same as configured in elfinder bundle + +```php + +createFormBuilder() + ->add('content', 'ckeditor', array( + 'config' => array( + 'filebrowser_image_browse_url' => array( + 'route' => 'elfinder', + 'route_parameters' => array('instance' => 'ckeditor'), + ), + ), + )) + ->getForm() +; +``` + +ElFinder will be available under Insert Image dialog + +## TinyMCE integration + +You can integrate TinyMCE byself or use Bundles that already add TinyMCE functionality to your Symfony project. +Below instruction how to integrate [FMElfinderBundle](https://github.com/helios-ag/FMElfinderBundle) with [TinyMCEBundle](https://github.com/stfalcon/TinymceBundle) + +How to use ElfinderBundle with [TinyMCEBundle](https://github.com/stfalcon/TinymceBundle) + +### TinyMCE 3.x +Instruction for version 0.2.1 (TinyMCE 3.x) +Download bundles, configure, dump and install assets as written in installation steps + +**Configuration** + +Update the editor property in your app/config.yml +Set TinyMce popup path: +```yaml +fm_elfinder: + editor: tinymce + tinymce_popup_path: "asset[bundles/stfalcontinymce/vendor/tiny_mce/tiny_mce_popup.js]" +``` +Under tinymce configuration node, theme configuration, add: +file_browser_callback : 'elFinderBrowser' + +```yaml +stfalcon_tinymce: + theme: + simple: + file_browser_callback : 'elFinderBrowser' +``` + +after ( {{ tinymce_init() }} ) function call +place ElfinderBundle's function: + +```jinja +{{ elfinder_tinymce_init('instance_name', {'width':'900', 'height': '450', 'title':'ElFinder 2.0'}) }} +``` + +as shown below + +```jinja +{{ tinymce_init() }} +{{ elfinder_tinymce_init('instance_name') }} +``` + +instance_name is an instance of elfinder's configuration + +### TinyMCE 4.x + +Update the editor property in your app/config.yml + +```yaml + fm_elfinder: + editor: tinymce4 +``` + +Under tinymce configuration node, theme configuration, add: +file_browser_callback : elFinderBrowser + +```yaml +stfalcon_tinymce: + theme: + simple: + file_browser_callback : elFinderBrowser +``` + +before ( {{ tinymce_init() }} ) function call (order is important) +place ElfinderBundle's function: +{{ elfinder_tinymce_init4('instance_name', {'width':'900', 'height': '450', 'title':'ElFinder 2.0'} ) }} +as shown below + +```jinja + {{ elfinder_tinymce_init4('instance_name') }} + {{ tinymce_init() }} +``` + +instance_name is instance of elfinder's configuration + +# Advanced configuration + +## Custom configuration provider + +ElFinder bundle allows to override his configuration provider service: + +```yaml +fm_elfinder: + configuration_provider: elfinder.configurator +``` +where 'elfinder.configurator' is default ElFinder's bundle service to read configuration from DIC + +To override service, simply define your own service: +```yaml +services: + my_elfinder_configurator: + class: Acme\DemoBundle\MyElfinderConfigurator + arguments: ["%my_arguments%"] +``` + +Configuration class must implement ElFinderConfigurationProviderInterface + +method getConfiguration($instance) should return array of parameters compatible with ElFinder bundle configuration + +## Custom loader + +It is possible to override loader service with your own class: + +```yaml +services: + my_loader: + class: AppBundle\Service\MyElFinderLoader + arguments: [@fm_elfinder.configurator] + +fm_elfinder: + loader: my_loader +``` +## Plugins + +ElFinder comes with few plugins, like auto-resize, which can be enabled, by the following configuration: + +```yaml +fm_elfinder: + instances: + tinymce: + locale: %locale% + editor: tinymce4 + include_assets: true + relative_path: true + fullscreen: true + connector: + debug: true # defaults to false + bind: + upload.presave: + - Plugin.AutoResize.onUpLoadPreSave + plugin: + AutoResize: # global resize options, applies to root which don't have his own resize configuraion + enable: true + maxWidth: 750 + maxHeight: 750 + quality: 95 # JPEG image save quality + roots: # at least one root must be defined + uploads: + driver: LocalFileSystem + path: uploads + plugin: + AutoResize: + enable: true + maxWidth: 500 + maxHeight: 500 + quality: 95 # JPEG image save quality + upload_allow: ['image/png', 'image/jpg', 'image/jpeg'] + upload_deny: ['all'] + upload_max_size: 2M + resize1: + driver: LocalFileSystem + path: uploads + plugin: + AutoResize: + enable: true # For control by volume driver + maxWidth: 800 # Path to Water mark image + maxHeight: 800 # Margin right pixel + quality: 95 # JPEG image save quality + upload_allow: ['image/png', 'image/jpg', 'image/jpeg'] + upload_deny: ['all'] + upload_max_size: 2M + resize2: + driver: LocalFileSystem + path: uploads + plugin: + AutoResize: + enable: true + maxWidth: 800 + maxHeight: 800 + quality: 95 + upload_allow: ['image/png', 'image/jpg', 'image/jpeg'] + upload_deny: ['all'] + upload_max_size: 2M +``` + +ElFinder comes with other plugins, check Plugins folder under ElFinderPHP for more information. + +## Symfony service as a volume driver + +volumeDriver can be declared as Symfony service +The service should however be an instance of the FM\ElFinderPHP\Driver\ElFinderVolumeDriver class. This check is to +ensure the service is a valid ElFinder VolumeDriver. + +To configure a root with a service-driver you can simply use the service id as the drive key: + +``` +fm_elfinder: + connector: + roots: + uploads: + driver: elfinder.driver.filesystem + path: uploads +``` + +This means that if you add the service definition: + +```xml + +``` + +# Changelog + +### 4.0 +* CORS support +* Flysystem driver support + +### 3.4 +* Custom template renderer + +### 3.3 +* Plugins support + +### 3.2 +* Assetic support removed + +### 3.1 +* Plugins support + +### 3.0 +* BC in public api (controllers showAction method with second parameter) + +### 2.5 +* Version with Request_stack + +### 2.3.3 +* Assetic support removed + +### 2.3.2 +* Multiple form types on the same page + +### 2.3 +* Version for the LTS Symfony (2.3.x) (without RequestStack usage) + +### 2.1 +* New Elfinder form type, provides basic field with Elfinder callback + +### 2.0 +* Multiple instances of elfinder configuration (allows multiple editors in one project, with different elfinder configurations) + +### 1.4 +* Dropped YUI compression support. +* Uglify JS/CSS optional compression. + +### 1.3 +* TinyMCE 4 integration +* Added link to IvoryCKEditorBundle in Readme +* Minor improvements +* Readme TOC + + + + +