Total Complexity | 5 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
17 | class CForumThreadRepository extends ResourceRepository |
||
18 | { |
||
19 | public function __construct(ManagerRegistry $registry) |
||
20 | { |
||
21 | parent::__construct($registry, CForumThread::class); |
||
22 | } |
||
23 | |||
24 | public function findAllByCourse( |
||
34 | } |
||
35 | |||
36 | public function increaseView(CForumThread $thread): void |
||
37 | { |
||
38 | $thread->setThreadViews($thread->getThreadViews() + 1); |
||
39 | $em = $this->getEntityManager(); |
||
40 | $em->persist($thread); |
||
41 | $em->flush(); |
||
42 | } |
||
43 | |||
44 | public function delete(ResourceInterface $resource): void |
||
53 | } |
||
54 | } |
||
55 |