55use App \Entity \Comment ;
66use App \Entity \Member ;
77use App \Repository \CommentRepository ;
8- use App \Utilities \ManagerTrait ;
98use Pagerfanta \Pagerfanta ;
109
1110/**
1615 */
1716class CommentModel
1817{
19- use ManagerTrait;
20-
2118 /**
2219 * @param int $page
2320 * @param int $limit
@@ -27,7 +24,7 @@ class CommentModel
2724 public function getComments ($ page = 1 , $ limit = 10 )
2825 {
2926 /** @var CommentRepository $repository */
30- $ repository = $ this ->getManager () ->getRepository (Comment::class);
27+ $ repository = $ this ->entityManager ->getRepository (Comment::class);
3128
3229 return $ repository ->pageAll ($ page , $ limit );
3330 }
@@ -41,7 +38,7 @@ public function getComments($page = 1, $limit = 10)
4138 public function getCommentsForMember (Member $ member , $ page = 1 , $ limit = 10 )
4239 {
4340 /** @var CommentRepository $repository */
44- $ repository = $ this ->getManager () ->getRepository (Comment::class);
41+ $ repository = $ this ->entityManager ->getRepository (Comment::class);
4542
4643 return $ repository ->pageAllForMember ($ member , $ page , $ limit );
4744 }
@@ -55,7 +52,7 @@ public function getCommentsForMember(Member $member, $page = 1, $limit = 10)
5552 public function getCommentsFromMember (Member $ member , $ page = 1 , $ limit = 10 )
5653 {
5754 /** @var CommentRepository $repository */
58- $ repository = $ this ->getManager () ->getRepository (Comment::class);
55+ $ repository = $ this ->entityManager ->getRepository (Comment::class);
5956
6057 return $ repository ->pageAllFromMember ($ member , $ page , $ limit );
6158 }
@@ -69,7 +66,7 @@ public function getCommentsFromMember(Member $member, $page = 1, $limit = 10)
6966 public function getCommentsByQuality ($ quality , $ page = 1 , $ limit = 10 )
7067 {
7168 /** @var CommentRepository $repository */
72- $ repository = $ this ->getManager () ->getRepository (Comment::class);
69+ $ repository = $ this ->entityManager ->getRepository (Comment::class);
7370
7471 return $ repository ->pageAllByQuality ($ quality , $ page , $ limit );
7572 }
@@ -83,7 +80,7 @@ public function getCommentsByQuality($quality, $page = 1, $limit = 10)
8380 public function getCommentsByAdminAction ($ action , $ page = 1 , $ limit = 10 )
8481 {
8582 /** @var CommentRepository $repository */
86- $ repository = $ this ->getManager () ->getRepository (Comment::class);
83+ $ repository = $ this ->entityManager ->getRepository (Comment::class);
8784
8885 return $ repository ->pageAllByAdmiNAction ($ action , $ page , $ limit );
8986 }
0 commit comments