コード例 #1
0
 public function setUp()
 {
     \Xpressengine\Comment\CommentEntity::setReplyCharlen(3);
 }
コード例 #2
0
 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     $source = base_path('core/src/Xpressengine/Comment/config/comment.php');
     $this->mergeConfigFrom($source, 'comment');
     CommentEntity::setReplyCharlen($this->app['config']['comment.commentReplyCodeLen']);
 }
コード例 #3
0
 /**
  * Reply character length
  *
  * @return int
  */
 private function getReplyCharlen()
 {
     return CommentEntity::getReplyCharlen();
 }
コード例 #4
0
 /**
  * 같은 depth 에 가장 마지막 자식노드의 reply 코드 값
  *
  * @param CommentEntity $comment comment object
  * @return string
  */
 public function getLastChildReply(CommentEntity $comment)
 {
     $reply = $this->conn->table($this->table)->where('head', $comment->head)->where('reply', 'like', $comment->reply . str_repeat('_', CommentEntity::getReplyCharlen()))->max('reply');
     return $reply;
 }