Esempio n. 1
0
 public function getParent()
 {
     return $this->hasOne(CategoryRecord::className(), ['id' => 'categoryId'])->lang();
 }
Esempio n. 2
0
 public function getCategory()
 {
     return $this->hasOne(CategoryRecord::className(), ['id' => 'categoryId'])->andWhere(['lang' => Yii::$app->language]);
 }