PHP code example of simialbi / yii2-elfinder

1. Go to this page and download the library: Download simialbi/yii2-elfinder library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

simialbi / yii2-elfinder example snippets


'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'
				]
			]
		]
	]
]


/* @var $this yii\web\View */

use simialbi\yii2\elfinder\widgets\ElFinder;

$this->title = 'elFinder';
$this->params['breadcrumbs'][] = $this->title;



/* @var $this yii\web\View */

use simialbi\yii2\elfinder\widgets\ElFinderInput;

$this->title = 'elFinder';
$this->params['breadcrumbs'][] = $this->title;


$ php composer.phar