ImageSizerForm.php
618 Bytes
<?php
namespace backend\models;
use yii\base\Model;
use yii\web\UploadedFile;
/**
* UploadForm is the model behind the upload form.
*/
class ImageSizerForm extends Model
{
/**
* @var UploadedFile file attribute
*/
public $file;
public $width;
public $height;
public $field;
public $model;
public $form;
/**
* @return array the validation rules.
*/
public function rules()
{
return [
[['width', 'height'], 'integer'],
[['field', 'model', 'form'], 'string', 'max' => 255],
[['file'], 'file'],
];
}
}