https://github.com/zxbodya/yii2-elfinder
Extension to use elFinder 1.x file manager in Yii2 application
https://github.com/zxbodya/yii2-elfinder
elfinder tinymce yii2 yii2-extension
Last synced: 8 months ago
JSON representation
Extension to use elFinder 1.x file manager in Yii2 application
- Host: GitHub
- URL: https://github.com/zxbodya/yii2-elfinder
- Owner: zxbodya
- Created: 2014-10-01T15:15:14.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2018-03-06T14:22:15.000Z (over 7 years ago)
- Last Synced: 2025-01-31T20:55:51.442Z (8 months ago)
- Topics: elfinder, tinymce, yii2, yii2-extension
- Language: JavaScript
- Size: 1.23 MB
- Stars: 10
- Watchers: 5
- Forks: 10
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# ElFinder 1.x Yii2 extension
Extension to simplify adding elFinder to Yii2 project.
Extension is rework from Yii 1.1 extension:
[https://github.com/zxbodya/yii-elfinder](https://github.com/zxbodya/yii-elfinder)
##Installation
The preferred way to install this extension is through [composer](https://getcomposer.org/).Either run
`php composer.phar require --prefer-dist zxbodya/yii2-elfinder "*@dev"`
or add
`"zxbodya/yii2-elfinder": "*@dev"`
to the require section of your `composer.json` file.
## Backend controller configuration
```php
namespace backend\controllers;
use Yii;
use yii\web\Controller;
use zxbodya\yii2\elfinder\ConnectorAction;
class ElFinderController extends Controller
{
public function actions()
{
return [
'connector' => array(
'class' => ConnectorAction::className(),
'settings' => array(
'root' => Yii::getAlias('@webroot') . '/uploads/',
'URL' => Yii::getAlias('@web') . '/uploads/',
'rootAlias' => 'Home',
'mimeDetect' => 'none'
)
),
];
}
}
```
## Widgets usage### FileInput
widget to choose file on server using ElFinder pop-up```php
echo $form->field($model, 'filePath')->widget(
ElFinderInput::className(),
['connectorRoute' => 'el-finder/connector',]
)
```
### ElFinderWidget```php
echo ElFinderWidget::widget(
['connectorRoute' => 'el-finder/connector',]
)
```## TinyMce integration
Widgets supports intergation with TinyMce wysiwyg editor
For more details see tinymce extension [https://github.com/zxbodya/yii2-tinymce](https://github.com/zxbodya/yii2-tinymce)