/** * @return \yii\db\ActiveQuery */ public function getTranslations() { return $this->hasMany(ReceivedCityTranslation::className(), ['city_code' => 'code'])->where(['language_id' => \common\components\TFA::$info['language_id']])->indexBy('language_id'); }
/** * @return \yii\db\ActiveQuery */ public function getCityTranslations() { return $this->hasMany(ReceivedCityTranslation::className(), ['language_id' => 'id']); }