/** * @return \yii\db\ActiveQuery */ public function getComments() { return $this->hasMany(Comment::className(), ['post_id' => 'id'])->where('status = ' . Comment::STATUS_APPROVED)->orderBy('id'); }
public function getComments() { return $this->hasMany(Comment::className(), ['topic_id' => 'id']); }
public function getAuthorComments() { return $this->hasMany(Comment::className(), ['author_id' => 'id']); }
public function getComments() { return $this->hasMany(Comment::className(), ['user_id' => 'id'])->select(['id', 'user_id', 'topic_id', 'created_at', 'invisible', 'content'])->limit(10)->orderBy(['id' => SORT_DESC]); }
public function getComments() { return $this->hasMany(Comment::className(), ['test_id' => 'id'])->orderBy('commentdate'); }
public function getComments() { return $this->hasMany(Comment::className(), ['book_id' => 'id'])->orderBy('created_at DESC'); }
public function getComments() { return $this->hasMany(Comment::className(), ['id' => 'child_id'])->via('commentClosures'); }
public function getComment() { return $this->hasOne(Comment::className(), ['id' => 'parent_id']); }
public function getComments() { return $this->hasMany(Comment::className(), ['author' => 'email']); }
public function getAllComments() { return $this->hasMany(Comment::className(), ['uid' => 'id'])->orderBy(['is_top' => SORT_DESC, 'post_time' => SORT_DESC]); }
public function getCommentCount() { return $this->hasMany(Comment::className(), ['target_id' => 'topic_id'])->where(['target_type' => 'topic'])->count(); }
public function getAllComments() { return $this->hasMany(Comment::className(), ['pid' => 'id'])->onCondition(['status' => Comment::STATUS_APPROVED])->orderBy(['create_time' => SORT_ASC]); }
/** * @return \yii\db\ActiveQuery */ public function getComments() { return $this->hasMany(Comment::className(), ['product_id' => 'id'])->orderBy(['created_at' => SORT_DESC]); }