PHPackages                             alphalemon/elfinder-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. alphalemon/elfinder-bundle

ActiveSymfony-bundle[File &amp; Storage](/categories/file-storage)

alphalemon/elfinder-bundle
==========================

The ElFinderBundle encapsulates the elFinder file manager to be used in Symfony2.

172.3k6[1 PRs](https://github.com/alphalemon/ElFinderBundle/pulls)1PHP

Since May 27Pushed 12y ago1 watchersCompare

[ Source](https://github.com/alphalemon/ElFinderBundle)[ Packagist](https://packagist.org/packages/alphalemon/elfinder-bundle)[ RSS](/packages/alphalemon-elfinder-bundle/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (1)Used By (1)

ElFinderBundle
==============

[](#elfinderbundle)

The ElFinderBundle encapsulates the elFinder file manager to be used in Symfony2.

Installation
------------

[](#installation)

Clone this bundle in the vendor/bundles/AlphaLemon directory:

```
git clone git://github.com/alphalemon/ElFinderBundle.git vendor/bundles/AlphaLemon/ElFinderBundle

```

**OR (if you're using deps file)**

Add the following to the deps file:

```
[ElFinderBundle]
    git=git://github.com/alphalemon/ElFinderBundle.git
    target=bundles/AlphaLemon/ElFinderBundle

```

Now use the vendors script to clone the newly added repositories into your project:

```
php bin/vendors install

```

Configure the ElFinderBundle
----------------------------

[](#configure-the-elfinderbundle)

Open the AppKernel configuration file and add the bundle to the registerBundles() method:

```
public function registerBundles()
{
    $bundles = array(
        ...
        new AlphaLemon\ElFinderBundle\AlphaLemonElFinderBundle(),
    )
}

```

Register the ElFinderBundle namespaces in `app/autoload.php`:

```
$loader->registerNamespaces(array(
    ...
    'AlphaLemon'                     => __DIR__.'/../vendor/bundles',
));

```

Import the routing configuration into the routing.yml file:

```
_AlphaLemonElFinderBundle:
    resource: "@AlphaLemonElFinderBundle/Resources/config/routing.yml"

```

Register the bundle into the Assetic bundles in config.yml:

```
# Assetic Configuration
assetic:
    bundles: [ "AlphaLemonElFinderBundle" ]

```

Initialize submodules grabbing the ElFinder vendor library. Move inside the ElFinder folder than give this commands:

```
git submodule init
git submodule update

```

To complete the bundle configuration you must install assets as follows:

```
app/console assets:install web
app/console assetic:dump

```

Using the object
----------------

[](#using-the-object)

AlphaLemonElFinderBundle provides a ready to use controller to display the ElFinder:

```
http://[yoursite]/al_showElFinder

```

Customize elFinder
------------------

[](#customize-elfinder)

The default connector has a very minimal configuration, so you would like to configure it on your needs. The elFinder object is loaded into the show.html.twig template, where all the required assets and initial jquery script are added. To change the configuration you shoud create a new twig template that extends the base one:

```
/path/to/your/twig/template

{% extends 'AlphaLemonElFinderBundle:ElFinder:show.html.twig' %}

```

This template has four blocks you may override:

```
{% block stylesheet_files %}{% endblock %}

{% block javascript_files %}{% endblock %}

{% block init_script %}{% endblock %}

{% block elfinder_html %}{% endblock %}

```

The names speak themselves, so if you need to change the init script, you just have to override the init\_script block:

```
{% block init_script %}

    $(document).ready(function() {
        $('').dialogelfinder({
                url : '/al_elFinderMediaConnect',
                lang : 'en',
                width : 840,
                destroyOnClose : true
        }).dialogelfinder('instance');
    });

{% endblock %}

```

Read the elFinder documentation to learn more on the available options

The connector
-------------

[](#the-connector)

The url option declares the connector to use. It is the class where are defined the elFinder options, like the folder where are saved the files and so on. In the example above the al\_elFinderMediaConnect route is called and the action implementstion might be:

```
public function connectMediaAction()
{
    $connector = $this->container->get('el_finder_media_connector');
    $connector->connect();
}

```

You may notice that the connector has been injected into the Dependency Injector Container, and its implementation is:

```

    Path\To\AlphaLemonElFinderMediaConnector

```

The class AlphaLemonElFinderMediaConnector is instantiated into the DIC. Follows a sample of its implementation:

```
namespace Path\To\AlphaLemonElFinderMediaConnector;

use AlphaLemon\ElFinderBundle\Core\Connector\AlphaLemonElFinderBaseConnector;

class AlphaLemonElFinderMediaConnector extends AlphaLemonElFinderBaseConnector
{
    protected function configure()
    {
        $request = $this->container->get('request');

        $options = array(
            'roots' => array(
                array(
                    'driver'        => 'LocalFileSystem',   // driver for accessing file system (REQUIRED)
                    'path'          => 'bundles/alphalemonelfinder/files/',         // path to files (REQUIRED)
                    'URL'           => $request->getScheme().'://'.$request->getHttpHost() . '/bundles/alphalemonelfinder/files/', // URL to files (REQUIRED)
                    'accessControl' => 'access'             // disable and hide dot starting files (OPTIONAL)
                )
            )
        );

        return $options;
    }
}

```

The connector extends the AlphaLemonElFinderBaseConnector which requires the derived class to implement a configure() method where the elFinder connector's options must be declared. This function must return an array of options.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/86c46bc59b7abe8c18a0bb08713b28f2a4e10c729f5c4c247361860f421bdf46?d=identicon)[alphalemon](/maintainers/alphalemon)

---

Top Contributors

[![alphalemon](https://avatars.githubusercontent.com/u/1242258?v=4)](https://github.com/alphalemon "alphalemon (48 commits)")[![franmomu](https://avatars.githubusercontent.com/u/720690?v=4)](https://github.com/franmomu "franmomu (1 commits)")[![gilles-g](https://avatars.githubusercontent.com/u/377875?v=4)](https://github.com/gilles-g "gilles-g (1 commits)")

### Embed Badge

![Health badge](/badges/alphalemon-elfinder-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/alphalemon-elfinder-bundle/health.svg)](https://phpackages.com/packages/alphalemon-elfinder-bundle)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
