/** * @return \yii\db\ActiveQuery */ public function getTheme() { return $this->hasOne(Theme::className(), ['id' => 'theme_id'])->via('ui'); }
/** * @return \yii\db\ActiveQuery */ public function getThemes() { return $this->hasMany(Theme::className(), ['created_by' => 'id'])->inverseOf('author'); }