Commit 5abe273178adb6f28df81d4f159d00b323029c8d

Authored by Anastasia
1 parent 2cba3729

- admin bug fix

labels/models/Delivery.php
@@ -23,6 +23,8 @@ @@ -23,6 +23,8 @@
23 * @property Language[] $languages 23 * @property Language[] $languages
24 * @property \artbox\order\models\Order[] $orders 24 * @property \artbox\order\models\Order[] $orders
25 * @see LanguageBehavior 25 * @see LanguageBehavior
  26 + * from VariationBehavior
  27 + * @method ActiveQuery hasDefaultVariationRelation();
26 */ 28 */
27 class Delivery extends ActiveRecord 29 class Delivery extends ActiveRecord
28 { 30 {
@@ -114,7 +116,7 @@ @@ -114,7 +116,7 @@
114 */ 116 */
115 public function getLanguage() 117 public function getLanguage()
116 { 118 {
117 - return $this->hasOne(DeliveryLang::className(), [ 'delivery_id' => 'id' ]); 119 + return $this->hasDefaultVariationRelation();
118 } 120 }
119 121
120 /** 122 /**
labels/models/Label.php
@@ -24,6 +24,8 @@ @@ -24,6 +24,8 @@
24 * @property Language[] $languages 24 * @property Language[] $languages
25 * @property \artbox\order\models\Order[] $orders 25 * @property \artbox\order\models\Order[] $orders
26 * @see LanguageBehavior 26 * @see LanguageBehavior
  27 + * from VariationBehavior
  28 + * @method ActiveQuery hasDefaultVariationRelation();
27 */ 29 */
28 class Label extends ActiveRecord 30 class Label extends ActiveRecord
29 { 31 {
@@ -120,7 +122,7 @@ @@ -120,7 +122,7 @@
120 */ 122 */
121 public function getLanguage() 123 public function getLanguage()
122 { 124 {
123 - return $this->hasOne(LabelLang::className(), [ 'label_id' => 'id' ]); 125 + return $this->hasDefaultVariationRelation();
124 } 126 }
125 127
126 /** 128 /**
labels/models/Payment.php
@@ -22,6 +22,8 @@ @@ -22,6 +22,8 @@
22 * @property PaymentLang[] $paymentLangs 22 * @property PaymentLang[] $paymentLangs
23 * @property Language[] $languages 23 * @property Language[] $languages
24 * @see LanguageBehavior 24 * @see LanguageBehavior
  25 + * from VariationBehavior
  26 + * @method ActiveQuery hasDefaultVariationRelation();
25 */ 27 */
26 class Payment extends ActiveRecord 28 class Payment extends ActiveRecord
27 { 29 {
@@ -108,7 +110,7 @@ @@ -108,7 +110,7 @@
108 */ 110 */
109 public function getLanguage() 111 public function getLanguage()
110 { 112 {
111 - return $this->hasOne(PaymentLang::className(), [ 'payment_id' => 'id' ]); 113 + return $this->hasDefaultVariationRelation();
112 } 114 }
113 115
114 /** 116 /**