コード例 #1
0
ファイル: Relations.php プロジェクト: nhatvuvan/yii2-widgets
 public function replies()
 {
     return $this->getCachedRelation('id', \nitm\widgets\models\Replies::className(), [], true, 'replies');
 }
コード例 #2
0
ファイル: Replies.php プロジェクト: nhatvuvan/yii2-widgets
 /**
  * Return the reply author_id information
  * @param string $what The property to return
  */
 public function getReplyTo()
 {
     return $this->hasOne(\nitm\widgets\models\Replies::className(), ['id' => 'reply_to'])->with('author');
 }