2017 © Pedro Peláez
 

yii2-extension yii2-cropper

Enhanced Yii2 wrapper for the Cropper jQuery plugin (sub repo split from yii2-widgets).

image

hustshenl/yii2-cropper

Enhanced Yii2 wrapper for the Cropper jQuery plugin (sub repo split from yii2-widgets).

  • Tuesday, March 22, 2016
  • by Shen.L
  • Repository
  • 1 Watchers
  • 1 Stars
  • 35 Installations
  • JavaScript
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 2 Versions
  • 13 % Grown

The README.md

yii2-widget-cropper

Latest Stable Version License Total Downloads Monthly Downloads Daily Downloads, (*1)

Installation

The preferred way to install this extension is through composer. Check the composer.json for this extension's requirements and dependencies. Read this web tip /wiki on setting the minimum-stability settings for your application's composer.json., (*2)

To install, either run, (*3)

$ php composer.phar require hustshenl/yii2-widget-cropper "@dev"

or add, (*4)

"hustshenl/yii2-widget-cropper": "@dev"

to the require section of your composer.json file., (*5)

Usage

In View, (*6)

echo Form::widget([ // continuation fields to row above without labels
    'model' => $model,
    'form' => $form,
    'columns' => 1,
    'attributes' => [
        'cover' => [
            'type' => Form::INPUT_WIDGET,
            'widgetClass' => '\hustshenl\cropper\Cropper',
            'options' => [
                'data' => '',
                'pluginOptions' => [
                    'aspectRatio' => 240 / 320,
                    'autoCropArea' => 1,
                    'preview' => '.img-preview',
                    'strict' => true,
                    'guides' => false,
                    'highlight' => true,
                    'dragCrop' => true,
                    'cropBoxMovable' => true,
                    'cropBoxResizable' => true,
                ],
            ]
        ],
    ]
]);

In Model, (*7)

$image = UploadedFile::getInstance($this, 'cover');
$cropper = $this->cover_crop

License

yii2-widget-cropper is released under the BSD 3-Clause License. See the bundled LICENSE.md for details., (*8)

The Versions

22/03 2016

dev-master

9999999-dev https://github.com/hustshenl/yii2-widget-cropper

Enhanced Yii2 wrapper for the Cropper jQuery plugin (sub repo split from yii2-widgets).

  Sources   Download

BSD-3-Clause

The Requires

 

plugin extension yii2 jquery form widget cropper

22/03 2016

0.1

0.1.0.0 https://github.com/hustshenl/yii2-widget-cropper

Enhanced Yii2 wrapper for the Cropper jQuery plugin (sub repo split from yii2-widgets).

  Sources   Download

BSD-3-Clause

The Requires

 

plugin extension yii2 jquery form widget cropper