| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function getCountForArticleInternalPageViews(ArticleInterface $article): int |
||
| 26 | { |
||
| 27 | $qb = $this->createQueryBuilder('ae') |
||
| 28 | ->select('COUNT(ae.id)') |
||
| 29 | ->andWhere('ae.action = :action') |
||
| 30 | ->andWhere('ae.pageViewSource = :pageviewSource') |
||
| 31 | ->leftJoin('ae.articleStatistics', 'ast') |
||
| 32 | ->andWhere('ast.article = :article') |
||
| 33 | ->setParameters([ |
||
| 34 | 'article' => $article, |
||
| 35 | 'action' => ArticleEventInterface::ACTION_PAGEVIEW, |
||
| 36 | 'pageviewSource' => ArticleEventInterface::PAGEVIEW_SOURCE_INTERNAL, |
||
| 37 | ]); |
||
| 38 | |||
| 39 | return (int) $qb->getQuery()->getSingleScalarResult(); |
||
| 40 | } |
||
| 41 | } |
||
| 42 |