ImageSizer.php 831 Bytes
<?php
/**
 * Created by PhpStorm.
 * User: vitaliy
 * Date: 05.10.15
 * Time: 16:18
 */

namespace backend\components;
use yii\base\Widget;


class ImageSizer extends Widget
{
    public $height;
    public $width;
    public $field;
    public $file;
    public $model;
    public $form;
    public $multi = false;
    public $gallery;

    public function init(){

        parent::init();

    }


    public function run()
    {

        return $this->render('image_sizer',
            [
                'model'=>$this->model,
                'field' => $this->field,
                'form' => $this->form,
                'height' => $this->height,
                'width' => $this->width,
                'multi'  => $this->multi
            ]);

    }

    public function getGalley(){
        return $this->gallery;
    }

}