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