Blame view

frontend/modules/user/widgets/ChangePassword.php 575 Bytes
d1f8bd40   Alexey Boroda   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  <?php
  
  namespace frontend\modules\user\widgets;
  
  
  use yii\base\Widget;
  use frontend\modules\user\models\form\ChangePassword as ChangePasswordForm;
  
  class ChangePassword extends Widget
  {
      public $view = 'change-password-popup';
      public $name = 'change-password';
      protected $model = ChangePasswordForm::class;
  
      public function run()
      {
          /** @var ChangePasswordForm $model */
          $model = new $this->model;
          $model->setScenario('passwordChange');
  
  
          return $this->render($this->view, [
              'model' => $model,
          ]);
      }
  }