2017 © Pedro Peláez
 

symfony-bundle fm-elfinder-bundle

ElFinder bundle, adds ElFinder file manager to your Symfony2 project

image

startsevdenis/fm-elfinder-bundle

ElFinder bundle, adds ElFinder file manager to your Symfony2 project

  • Monday, February 15, 2016
  • by startsevdenis
  • Repository
  • 1 Watchers
  • 0 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 89 Forks
  • 0 Open issues
  • 40 Versions
  • 0 % Grown

The README.md

FMElfinderBundle

ElFinder integration in Symfony2, (*1)

Code Quality Assurance

Gitter SL Insight TravisCI Coverage License Version
Gitter SensioLabsInsight Build Status Coverage Status Software License Latest Stable Version
Dependencies Downloads
Dependency Status Total Downloads

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., (*2)

Recommended bundles to use with:, (*3)

FMTinyMCEBundle IvoryCKEditorBundle TrsteelCkeditorBundle FMSummernoteBundle
FMTinyMCEBundle IvoryCKEditorBundle TrsteelCkeditorBundle FMSummernoteBundle

Table of contents, (*4)

Installation

Step 1: Installation

Version 6 (Symfony 3 Compatible):, (*7)

Add FMElFinderBundle to your composer.json, (*8)

{
    "require": {
        "helios-ag/fm-elfinder-bundle": "~6",
    }
}

Version 5:, (*9)

Add FMElfinderBundle to your composer.json:, (*10)

{
    "require": {
        "helios-ag/fm-elfinder-bundle": "~5",
    }
}

also add component-dir under config node of composer.json, (*11)

{
    "config": {
        "component-dir": "web/assets"
    }
}

Version 4:, (*12)

This version doesn't use component library, (*13)

composer require helios-ag/fm-elfinder-bundle: "~4.0"

For Symfony =<2.3 use version ~2.3, (*14)

composer require helios-ag/fm-elfinder-bundle: "~2.3"

Now tell composer to download the bundle by running the command:, (*15)

composer update helios-ag/fm-elfinder-bundle

Step 2: Enable the bundle

Enable the bundle in the kernel:, (*16)

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new FM\ElfinderBundle\FMElfinderBundle(),
    );
}

Step 3: Import FMElfinderBundle routing file

``` yaml, (*17)

app/config/routing.yml

elfinder: resource: "@FMElfinderBundle/Resources/config/routing.yml", (*18)


### Step 4: Configure your application's security.yml Secure ElFinder with access_control: ``` yaml # app/config/security.yml security: //.... access_control: - { path: ^/efconnect, role: ROLE_USER } - { path: ^/elfinder, role: ROLE_USER }

Step 5: Install assets

Install and dump assets via symfony built-in command:, (*19)

app/console assets:install web

Basic configuration

Add configuration options to your config.yml

fm_elfinder:
    instances:
        default:
            locale: %locale% # defaults to current request locale
            editor: ckeditor # other options are tinymce, tinymce4, fm_tinymce,  form, simple, custom
            #editor_template: set custom template for your editor # default null
            #path_prefix: / # for setting custom assets path prefix, useful for non vhost configurations, i.e. http://127.0.0.1/mysite/
            #fullscreen: true|false # defaults true, applies to simple and ckeditor editors
            #theme: smoothness # jquery theme, default is 'smoothness'
            include_assets: true # disable if you want to handle loading of the javascript and css assets yourself
            #visible_mime_types: ['image/png', 'image/jpg', 'image/jpeg'] # only show these mime types, defaults to show all
            connector:
                #debug: true|false # defaults to false
                roots:       # at least one root must be defined
                    uploads:
                        #show_hidden: true|false # defaults to false, hide files that
                        driver: LocalFileSystem
                        path: uploads
                        upload_allow: ['image/png', 'image/jpg', 'image/jpeg']
                        upload_deny: ['all']
                        upload_max_size: 2M
                        #attributes: example of setting attributes permission
                        #    - { pattern: '/(.*?)/', read: true, write: false, locked: true }
  • default - instance of elfinder, can be used to define multiple configurations of ElFinder, allows simultaneous configuration for different types of WYSIWYG editors in your project
  • path - define root directory for the files inside web/ directory, default is "uploads". Make sure to set proper write/read permissions to this directory.
  • url - url to be prefixed to image path, for displaying. Can be either absolute or relative. If relative, it will be prefixed with the applications base-url. If left blank, url will be the base-url, append with the value of the 'path' parameter
  • driver - can be LocalFileSystem, FTP or MySQL2, currently supported only LocalFileSystem, default is LocalFileSystem
  • locale - locale determines, which language, ElFinder will use, to translate user interface, default is current request locale
  • cors_support - allows cross domain responses handling (default false)
  • editor - determines what template to render, to be compatible with WYSIWYG web editor, currently supported options are: "ckeditor" (to use with IvoryCKEditorBundle or TrsteelCkeditorBundle), "fm_tinymce" for tinymce4 (to use with FMTinyMCEBundle), "form" for form type, "simple" for standalone and "custom" for custom template. How to configure CKEDitor and TinyMCE to work with this bundle, will be explained further in this document.
  • editor_template - define template to render editor is set to "custom".
  • connector - root node for defining options for elfinder root directories.
  • roots - define "virtual directories" that reflect directories in your project.
  • path_prefix - path prefix with relative_path enabled, default is slash ('/')
    • show_hidden - show files and folders that starts from . (dot)
    • driver - driver type, LocalFileSystem, Dropbox, FTP
    • volume_id - (optional) can be used to force a volume id when mounting volume (default auto-increments). If provided, it must be an integer bigger than 0.
    • alias - directory alias
    • path - directory that contains files
    • upload_allow: ['image/png', 'image/jpg', 'image/jpeg']
    • upload_deny: ['all']
    • upload_max_size: 2M

You can see the full list of roots options here. To use them, convert camelCased option name to under_scored name., (*20)

Use multiple upload folder by instance

You can set multiple upload root folder by instance configuration., (*21)

If you have configured your instance with /uploads path, you can provide an additional folder as a home folder (e.g. for a multi-users application) when accessing to the instance URL :, (*22)

/elfinder/{instance}/{homeFolder} or /efconnect/{instance}/{homeFolder}, (*23)

For example, accessing to /elfinder/acmeInstance/bob URL will open up elfinder with /uploads/bob as root directory which only contains Bob's files., (*24)

Then, accessing to /elfinder/acmeInstance/alice URL will re-use your instance, but open up elfinder with /uploads/alice folder as root directory, containing only Alice's files., (*25)

To use this feature, you must provide the instance name in the URL, and of course be sure to set proper write/read permissions on home folders., (*26)

Note: this feature is only available with LocalFileSystem driver., (*27)

The Versions

24/08 2014
09/08 2014
09/05 2014

1.5

1.5.0.0 https://github.com/helios-ag/FMElfinderBundle

ElFinder bundle, add ElFinder file manager to your Symfony2 project

  Sources   Download

MIT

The Requires

 

by Al Ganiev

elfinder file manager

19/12 2013

1.4.2

1.4.2.0 https://github.com/helios-ag/FMElfinderBundle

ElFinder bundle, add ElFinder file manager to your Symfony2 project

  Sources   Download

MIT

The Requires

 

by Al Ganiev

elfinder file manager

13/11 2013

1.4.1

1.4.1.0 https://github.com/helios-ag/FMElfinderBundle

ElFinder bundle, add ElFinder file manager to your Symfony2 project

  Sources   Download

MIT

The Requires

 

by Al Ganiev

elfinder file manager

03/10 2013

1.4

1.4.0.0 https://github.com/helios-ag/FMElfinderBundle

ElFinder bundle, add ElFinder file manager to your Symfony2 project

  Sources   Download

MIT

The Requires

 

by Al Ganiev

elfinder file manager

27/08 2013

1.3

1.3.0.0 https://github.com/helios-ag/FMElfinderBundle

ElFinder bundle, add ElFinder file manager to your Symfony2 project

  Sources   Download

MIT

The Requires

 

by Al Ganiev

elfinder file manager

03/08 2013

1.2

1.2.0.0 https://github.com/helios-ag/FMElfinderBundle

ElFinder bundle, add ElFinder file manager to your Symfony2 project

  Sources   Download

MIT

The Requires

 

by Al Ganiev

elfinder file manager

12/06 2013

1.1

1.1.0.0 https://github.com/helios-ag/FMElfinderBundle

ElFinder bundle, add ElFinder file manager to your Symfony2 project

  Sources   Download

MIT

The Requires

 

by Al Ganiev

elfinder file manager

07/06 2013

1.0

1.0.0.0 https://github.com/helios-ag/FMElfinderBundle

ElFinder bundle, add ElFinder file manager to your Symfony2 project

  Sources   Download

MIT

The Requires

 

by Al Ganiev

elfinder file manager