2017 © Pedro Peláez
 

yii2-extension yii2-imagecrop

Simple photo cropper

image

shoxabbos/yii2-imagecrop

Simple photo cropper

  • Thursday, August 17, 2017
  • by shoxabbos
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • JavaScript
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 20 % Grown

The README.md

IMage Crop

Crop image with croppic.js lib, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist shoxabbos/yii2-imagecrop "*"

or add, (*4)

"shoxabbos/yii2-imagecrop": "*"

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

Demo

alt text, (*6)

Usage

Add this action to your controller, (*7)

public function actions()
{
    return [
        'crop' => [
            'class' => \shoxabbos\imagecrop\CropAction::className(),
            'width' => 900,
            'height' => 600,
            'whenCropped' => function () {
                // when file cropped!
            }
        ]
    ];
}

Add this code to your view file, (*8)

\shoxabbos\imagecrop\CropWidget::widget([
    'action' => Url::to(['crop']),
    'image' => $model->photoUrl,
    'path' => Yii::getAlias('@webroot')."/".$model->photo,
    'ration' => '4 / 3',
]);

Developer Team http://www.qwerty.uz, (*9)

The Versions

17/08 2017

dev-master

9999999-dev

Simple photo cropper

  Sources   Download

MIT

The Requires

 

by Avatar shoxabbos

extension yii2 imagecrop

17/08 2017

v2.0.0

2.0.0.0

Simple photo cropper

  Sources   Download

MIT

The Requires

 

by Avatar shoxabbos

extension yii2 imagecrop

17/08 2017

v1.0.0

1.0.0.0

Simple photo cropper

  Sources   Download

MIT

The Requires

 

by Avatar shoxabbos

extension yii2 imagecrop