From 5abe273178adb6f28df81d4f159d00b323029c8d Mon Sep 17 00:00:00 2001 From: Anastasia Date: Mon, 23 Apr 2018 12:09:11 +0300 Subject: [PATCH] - admin bug fix --- labels/models/Delivery.php | 4 +++- labels/models/Label.php | 4 +++- labels/models/Payment.php | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/labels/models/Delivery.php b/labels/models/Delivery.php index 06d1def..f24768a 100755 --- a/labels/models/Delivery.php +++ b/labels/models/Delivery.php @@ -23,6 +23,8 @@ * @property Language[] $languages * @property \artbox\order\models\Order[] $orders * @see LanguageBehavior + * from VariationBehavior + * @method ActiveQuery hasDefaultVariationRelation(); */ class Delivery extends ActiveRecord { @@ -114,7 +116,7 @@ */ public function getLanguage() { - return $this->hasOne(DeliveryLang::className(), [ 'delivery_id' => 'id' ]); + return $this->hasDefaultVariationRelation(); } /** diff --git a/labels/models/Label.php b/labels/models/Label.php index 2e82a4d..3477445 100755 --- a/labels/models/Label.php +++ b/labels/models/Label.php @@ -24,6 +24,8 @@ * @property Language[] $languages * @property \artbox\order\models\Order[] $orders * @see LanguageBehavior + * from VariationBehavior + * @method ActiveQuery hasDefaultVariationRelation(); */ class Label extends ActiveRecord { @@ -120,7 +122,7 @@ */ public function getLanguage() { - return $this->hasOne(LabelLang::className(), [ 'label_id' => 'id' ]); + return $this->hasDefaultVariationRelation(); } /** diff --git a/labels/models/Payment.php b/labels/models/Payment.php index f04a8c3..ebd075c 100755 --- a/labels/models/Payment.php +++ b/labels/models/Payment.php @@ -22,6 +22,8 @@ * @property PaymentLang[] $paymentLangs * @property Language[] $languages * @see LanguageBehavior + * from VariationBehavior + * @method ActiveQuery hasDefaultVariationRelation(); */ class Payment extends ActiveRecord { @@ -108,7 +110,7 @@ */ public function getLanguage() { - return $this->hasOne(PaymentLang::className(), [ 'payment_id' => 'id' ]); + return $this->hasDefaultVariationRelation(); } /** -- libgit2 0.21.4