File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ namespace app\models;
83
83
84
84
use app\presenters\UserPresenter;
85
85
use frostealth\presenter\interfaces\PresentableInterface;
86
- use frostealth\presenter\traits\PresentableTrait;
86
+ use frostealth\yii2\ presenter\traits\PresentableTrait;
87
87
88
88
/**
89
89
* Class User
Original file line number Diff line number Diff line change @@ -45,8 +45,7 @@ protected function buildPresenter()
45
45
46
46
$ presenter = $ this ->presenter ;
47
47
$ presenter = is_string ($ presenter ) ? ['class ' => $ presenter ] : (array )$ presenter ;
48
- $ presenter ['entity ' ] = $ this ;
49
- $ presenter = \Yii::createObject ($ presenter );
48
+ $ presenter = \Yii::createObject ($ presenter , [$ this ]);
50
49
51
50
if (!$ presenter instanceof PresenterInterface) {
52
51
throw new PresenterException (strtr (
You can’t perform that action at this time.
0 commit comments