Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
evgen-d committed Dec 2, 2014
1 parent 4b05763 commit 727cdff
Showing 1 changed file with 49 additions and 2 deletions.
51 changes: 49 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,49 @@
yii2-dropzone
=============
Dropzone Extension for Yii 2
==============================

This extension provides the [Dropzone](http://www.dropzonejs.com/) integration for the Yii2 framework.


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

This extension requires [Dropzone](https://github.com/enyo/dropzone)

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

Either run

```
php composer.phar require --prefer-dist devgroup/yii2-dropzone "*"
```

or add

```
"devgroup/yii2-dropzone": "*"
```

to the require section of your composer.json.


General Usage
-------------

```php
use devgroup\dropzone\Dropzone;

Dropzone::widget(
[
'name' => 'file', // input name or 'model' and 'attribute'
'url' => '', // upload url
'storedFiles' => [], // stores files
'eventHandlers' = [], // dropzone event handlers
'sortable' => true, // sortable flag
'sortableOptions' => [], // sortable options
'htmlOptions' => [], // container html options
'options' => [], // dropzone js options
]
)
```

you can also register `devgroup\dropzone\UploadAction` and `devgroup\dropzone\RemoveAction` actions in your controller

0 comments on commit 727cdff

Please sign in to comment.