Skip to content

Commit 1aacaed

Browse files
committed
PHP 8.1 fixes
1 parent 451cc0f commit 1aacaed

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/models/BaseModel.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212

1313
use bedezign\yii2\audit\AuditTrailBehavior;
14+
use dmstr\modules\prototype\traits\EditorEntry;
1415
use Yii;
1516
use yii\behaviors\TimestampBehavior;
1617
use yii\db\ActiveQuery;
@@ -23,6 +24,7 @@
2324
*/
2425
class BaseModel extends ActiveRecord
2526
{
27+
use EditorEntry;
2628

2729
/**
2830
* Column attribute 'created_at'

src/models/Search.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function allEntries()
6363
$allEntries[$entryId] = [
6464
'id' => $entryId,
6565
'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])
6767
];
6868
}
6969
return $allEntries;

src/widgets/TwigWidget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ private function generateKey()
7575
if (isset(Yii::$app->controller->actionParams[$this->queryParam])) {
7676
$key = Yii::$app->controller->actionParams[$this->queryParam];
7777
}
78-
$language = $this->localized ? Yii::$app->language : ActiveRecordAccessTrait::$_all;
78+
$language = $this->localized ? Yii::$app->language : Twig::$_all;
7979

8080
return $language . '/' . Yii::$app->controller->route . ($key ? '/' . $key : '') .
8181
($this->position ? '#' . $this->position : '');

0 commit comments

Comments
 (0)