Download the PHP package jakharbek/yii2-filemanager without Composer

On this page you can find all versions of the php package jakharbek/yii2-filemanager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-filemanager

File Manager

File Manager

Installation

The preferred way to install this extension is through composer.

Either run

or add

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

Migrations

You need to do the migration

Module

You need to connect the module of the backend part app.\jakharbek\filemanager\backend\Module

Params

You need to add parameters to the application in the file. example

thumbs - thumbnails images
images_ext - images ext
use_file_name - When uploading a file, whether to use the file name in the file download or create a hash
use_queue - When uploading a file, is it necessary to use a queue to load some photos in the background mode?

Apply DI (dependency injection)

There is a class \jakharbek\filemanager\bootstrap\SetUp you need to apply it to the initial download of the application as an example.

Ways to use

There are two ways to use you can use using a relation in a database or a column in a table:

Method use via the relation

Suppose you have a junction table for example

And let's say you have the appropriate relational methods in Active Record

And now you need to apply special behavior jakharbek\filemanager\behaviors\FileRelationBehavior for such cases.

For example:

You will need to create a property for exchanging data between the form and the model in case it found file_image

or

Next, you need to add this property file_image to the rules of the model as safe. For example:

Now you can apply a file load/upload widget jakharbek\filemanager\widgets\FileInput for this field.

For example

Use without a junction table

I assume that you already have fields in the table for storing file identifiers there. The type of this column should be a string, since file identifiers will be stored there through a separator for example we have images column for posts table

In this case, you can immediately use the widget without any model settings.

For example:

Use in CKEditor

To use the plug-in file manager in the editor, you need to specify this plug-in in the settings as shown in the example. For example:

After you need to run once this code to launch a modal window when you click a button in the editor

Helpers

You have to help the class jakharbek\filemanager\helpers\FileManagerHelper There is one method that you will often use in my opinion:FileManagerHelper::getFilesById

API

The extension has an API, you can connect it and get access to the file manager via the API jakharbek\filemanager\api\FilesController
If you need an action of this controller, you can use them by looking at the action method of this class.


All versions of yii2-filemanager with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version ~2.0.0
kartik-v/yii2-sortable-input Version v1.2.1
kartik-v/yii2-editable Version v1.7.8
kartik-v/yii2-widget-fileinput Version v1.0.9
2amigos/yii2-ckeditor-widget Version ^2.1
yiisoft/yii2-imagine Version ~2.1.0
yiisoft/yii2-queue Version ^2.0
yiisoft/yii2-redis Version ~2.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jakharbek/yii2-filemanager contains the following files

Loading the files please wait ....