Example #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getComments()
 {
     return $this->hasMany(Comment::className(), ['post_id' => 'id'])->where('status = ' . Comment::STATUS_APPROVED)->orderBy('id');
 }
Example #2
0
 public function getComments()
 {
     return $this->hasMany(Comment::className(), ['topic_id' => 'id']);
 }
Example #3
0
 public function getAuthorComments()
 {
     return $this->hasMany(Comment::className(), ['author_id' => 'id']);
 }
Example #4
0
 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]);
 }
Example #5
0
 public function getComments()
 {
     return $this->hasMany(Comment::className(), ['test_id' => 'id'])->orderBy('commentdate');
 }
Example #6
0
 public function getComments()
 {
     return $this->hasMany(Comment::className(), ['book_id' => 'id'])->orderBy('created_at DESC');
 }
Example #7
0
 public function getComments()
 {
     return $this->hasMany(Comment::className(), ['id' => 'child_id'])->via('commentClosures');
 }
Example #8
0
 public function getComment()
 {
     return $this->hasOne(Comment::className(), ['id' => 'parent_id']);
 }
Example #9
0
 public function getComments()
 {
     return $this->hasMany(Comment::className(), ['author' => 'email']);
 }
Example #10
0
 public function getAllComments()
 {
     return $this->hasMany(Comment::className(), ['uid' => 'id'])->orderBy(['is_top' => SORT_DESC, 'post_time' => SORT_DESC]);
 }
Example #11
0
 public function getCommentCount()
 {
     return $this->hasMany(Comment::className(), ['target_id' => 'topic_id'])->where(['target_type' => 'topic'])->count();
 }
Example #12
0
 public function getAllComments()
 {
     return $this->hasMany(Comment::className(), ['pid' => 'id'])->onCondition(['status' => Comment::STATUS_APPROVED])->orderBy(['create_time' => SORT_ASC]);
 }
Example #13
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getComments()
 {
     return $this->hasMany(Comment::className(), ['product_id' => 'id'])->orderBy(['created_at' => SORT_DESC]);
 }