public function getTag() { return $this->hasOne(Tag::className(), ['tid' => 'id']); }
public function getTag() { return $this->hasOne(Tag::className(), ['id' => 'tag_id'])->select(['id', 'name']); }
public function getTags() { return $this->hasMany(Tag::className(), ['id' => 'tag_id'])->viaTable(TagTopic::tableName(), ['topic_id' => 'id']); }
public function getPersonalTags() { return $this->hasMany(Tag::className(), ['id' => 'tag_id'])->personalTags()->viaTable('partner_tag', ['partner_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getTags() { return $this->hasMany(Tag::className(), ['id' => 'tag_id'])->viaTable('artist_tag', ['artist_id' => 'id']); }
public function getTags() { return $this->hasMany(Tag::className(), ['id' => 'tagId'])->viaTable('image_tag', ['imageId' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getBookTags() { return $this->hasMany(Tag::className(), ['id' => 'tagId'])->viaTable('book_tag', ['bookId' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getTags() { return $this->hasMany(Tag::className(), ['user_id' => 'id']); }
public function getTags() { return $this->hasMany(Tag::className(), ['id' => 'tag_id'])->viaTable('threads_tags', ['thread_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getTag0() { return $this->hasOne(Tag::className(), ['tag_id' => 'tag']); }
/** * 获取帖子标签(关联tag_item表) * @return mixed */ public function getTags() { return $this->hasMany(Tag::className(), ['id' => 'tid'])->viaTable(TagItem::tableName(), ['target_id' => 'id'], function ($model) { $model->andWhere(['target_type' => static::TYPE]); }); }