1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace app\widgets;
- use yii\base\Widget;
- use yii\helpers\Html;
- class CropperjsWidget extends Widget
- {
- public $image;
- public $file;
- public $post;
- public $aspectRatio;
- public function init()
- {
- parent::init();
- if ($this->image === null) {
- $this->image = 'image';
- }
- if ($this->file === null) {
- $this->file = 'photo';
- }
- if ($this->post === null) {
- $this->post = 'cropper';
- }
- if ($this->aspectRatio === null) {
- $this->aspectRatio = '16/9';
- }
- }
- public function run()
- {
- return $this->render('cropperjswidget/modal');;
- }
- }
|