/**
  * @return \yii\db\ActiveQuery
  */
 public function getLanguage()
 {
     return $this->hasOne(Language::className(), ['code' => 'language_id']);
 }
Esempio n. 2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getLanguages()
 {
     return $this->hasMany(Language::className(), ['code' => 'language_id'])->viaTable('city_translation', ['city_id' => 'id']);
 }