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