2017 © Pedro Peláez
 

yii2-extension cropit

Cropit widget for yii2

image

kujiorpamm/cropit

Cropit widget for yii2

  • Friday, February 10, 2017
  • by kujiorpamm
  • Repository
  • 1 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

test

In active form, (*1)

echo $form->field($model, 'image')->widget(\kujiorpamm\test\widgets\TestWidget::className(), [
            'pluginOptions' => [
                'width' => 200,
                'height' => 100,
                'smallImage' => 'allow',
                'onImageError' => new JsExpression('function(e) {
                    alert(e.message);   
                }')
            ]
            
            ]);
            

Then in controller after model loaded, (*2)


use kujiorpamm\test\widgets\TestWidget;

TestWidget::saveAs($model->image, "images/{$model->name}.png");

The Versions

10/02 2017

dev-master

9999999-dev

Cropit widget for yii2

  Sources   Download

MIT

The Requires

  • bower-asset/cropit ~0.5.0

 

by Avatar Slava