File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 11
11
12
12
13
13
use bedezign \yii2 \audit \AuditTrailBehavior ;
14
+ use dmstr \modules \prototype \traits \EditorEntry ;
14
15
use Yii ;
15
16
use yii \behaviors \TimestampBehavior ;
16
17
use yii \db \ActiveQuery ;
23
24
*/
24
25
class BaseModel extends ActiveRecord
25
26
{
27
+ use EditorEntry;
26
28
27
29
/**
28
30
* Column attribute 'created_at'
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ public function allEntries()
63
63
$ allEntries [$ entryId ] = [
64
64
'id ' => $ entryId ,
65
65
'name ' => $ model ['key ' ],
66
- 'opened ' => isset (Yii::$ app ->session ->get (md5 (EditorEntry ::$ cacheKey ), [])[self ::class][$ entryId ])
66
+ 'opened ' => isset (Yii::$ app ->session ->get (md5 (BaseModel ::$ cacheKey ), [])[self ::class][$ entryId ])
67
67
];
68
68
}
69
69
return $ allEntries ;
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ private function generateKey()
75
75
if (isset (Yii::$ app ->controller ->actionParams [$ this ->queryParam ])) {
76
76
$ key = Yii::$ app ->controller ->actionParams [$ this ->queryParam ];
77
77
}
78
- $ language = $ this ->localized ? Yii::$ app ->language : ActiveRecordAccessTrait ::$ _all ;
78
+ $ language = $ this ->localized ? Yii::$ app ->language : Twig ::$ _all ;
79
79
80
80
return $ language . '/ ' . Yii::$ app ->controller ->route . ($ key ? '/ ' . $ key : '' ) .
81
81
($ this ->position ? '# ' . $ this ->position : '' );
You can’t perform that action at this time.
0 commit comments