PHPackages                             simialbi/yii2-elfinder - 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. simialbi/yii2-elfinder

ActiveYii2-extension[File &amp; Storage](/categories/file-storage)

simialbi/yii2-elfinder
======================

Elfinder implementation for yii2 framework

1.8.1(4y ago)76974[2 issues](https://github.com/simialbi/yii2-elfinder/issues)MITSCSSPHP &gt;=5.6CI failing

Since Sep 15Pushed 1y ago4 watchersCompare

[ Source](https://github.com/simialbi/yii2-elfinder)[ Packagist](https://packagist.org/packages/simialbi/yii2-elfinder)[ RSS](/packages/simialbi-yii2-elfinder/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (8)Versions (52)Used By (0)

yii2-elfinder
=============

[](#yii2-elfinder)

This extension integrates the jQuery elFinder into yii2 framework (the yii way: with elFinder component, behaviors, configurable objects, events etc.). Additionally it prevents jui/elfinder css from loading and provides it's own styles for elfinder (bootstrap3 / fontawesome scss based style).

[![Latest Stable Version](https://camo.githubusercontent.com/dd5bf60fe14bf8e8d6c3c136aabd5f84dc8c1e85b8cf839c20f3b35aa717d9d4/68747470733a2f2f706f7365722e707567782e6f72672f73696d69616c62692f796969322d656c66696e6465722f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/simialbi/yii2-elfinder)[![Total Downloads](https://camo.githubusercontent.com/77dcf36d692f79fbe7a3217f4d2055af6a821702bb7b06328741ef02add050e3/68747470733a2f2f706f7365722e707567782e6f72672f73696d69616c62692f796969322d656c66696e6465722f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/simialbi/yii2-elfinder)[![License](https://camo.githubusercontent.com/7e7f1defd7da727f0d767a6c95ae6e77a3c65d39b1239ed6255cd6b46630fa63/68747470733a2f2f706f7365722e707567782e6f72672f73696d69616c62692f796969322d656c66696e6465722f6c6963656e73653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/simialbi/yii2-elfinder)[![Build Status](https://github.com/simialbi/yii2-elfinder/actions/workflows/build.yml/badge.svg)](https://github.com/simialbi/yii2-elfinder/actions/workflows/build.yml)

Resources
---------

[](#resources)

- [elFinder](https://github.com/Studio-42/elFinder)
- [yii2](https://github.com/yiisoft/yii2) framework

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
$ php composer.phar require --prefer-dist simialbi/yii2-elfinder

```

or add

```
"simialbi/yii2-elfinder": "*"

```

to the `require` section of your `composer.json`

Usage
-----

[](#usage)

### Setup Module

[](#setup-module)

Add the module `elfinder` to the modules section of your configuration file:

```
'modules' => [
	'elfinder' => [
		'class'          => 'simialbi\yii2\elfinder\Module',
		'options'        => [
			'default' => [
				'class'      => 'simialbi\yii2\elfinder\ElFinderOptions',
				'locale'     => 'de_DE.UTF-8',
				'maxTargets' => 0
			]
		],
		'connectionSets' => [
			'default' => [ // like elfinder roots
				[
					'class' => 'simialbi\yii2\elfinder\ElFinderConfigurationLocalFileSystem',
					'path'  => '@webroot/files',
					'URL'   => '@web/files'
				]
			]
		],
		'volumeBehaviors' => [
			'default' => [ // like elfinder plugins, add behaviors
				'as resizer'   => [
					'class'	    => 'simialbi\yii2\elfinder\behaviors\ImageResizeBehavior',
					'maxWidth'  => 1920,
					'maxHeight' => 1080,
					'quality'   => 70
				],
				'as optimizer' => [
					'class' => 'simialbi\yii2\elfinder\behaviors\ImageOptimizeBehavior'
				]
			]
		]
	]
]
```

Example Usage
-------------

[](#example-usage)

### Elfinder widget

[](#elfinder-widget)

To include an elfinder instance in one of your pages, call the elfinder widget like this:

```

```

All options from [elfinder client configuration options](https://github.com/Studio-42/elFinder/wiki/Client-configuration-options-2.1)and `instanceName` can be used to configure the widget.

### ElFinderInput widget

[](#elfinderinput-widget)

To include an elfinder input field widget, call the input widget like this:

```
