From d73c3e95c5c73d147e874198b3203653516693b9 Mon Sep 17 00:00:00 2001 From: dozer111 Date: Tue, 24 Jul 2018 15:56:30 +0300 Subject: [PATCH] fix language reverse in admin when update page/page --- backend/traits/AliasableTrait.php | 34 ++++++++++++++++++++++++++++++++++ common/models/page/Page.php | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 backend/traits/AliasableTrait.php diff --git a/backend/traits/AliasableTrait.php b/backend/traits/AliasableTrait.php new file mode 100644 index 0000000..b328144 --- /dev/null +++ b/backend/traits/AliasableTrait.php @@ -0,0 +1,34 @@ +hasMany(Alias::className(), ['route' => 'route'])->orderBy(['id' => SORT_ASC]); + } + +} + diff --git a/common/models/page/Page.php b/common/models/page/Page.php index 9f93d6e..396c014 100644 --- a/common/models/page/Page.php +++ b/common/models/page/Page.php @@ -5,7 +5,7 @@ use artbox\core\behaviors\GalleryBehavior; use artbox\core\models\Image; use artbox\core\models\Language; - use artbox\core\models\traits\AliasableTrait; + use backend\traits\AliasableTrait; use yii\behaviors\TimestampBehavior; use yii\db\ActiveQuery; use yii\db\ActiveRecord; -- libgit2 0.21.4