/** * @return \yii\db\ActiveQuery */ public function getBaseNews() { return $this->hasMany(BaseNews::className(), ['id' => 'base_news_id'])->viaTable('base_news_base_tag', ['base_tag_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getBase() { return $this->hasOne(BaseNews::className(), ['id' => 'base_id']); }