- move NodeView to Analytic/View
- move NodeViewListener to AnalyticListener - add referer
This commit is contained in:
parent
58c8b6126e
commit
ec4b3341c8
17 changed files with 393 additions and 116 deletions
28
core/Repository/Analytic/RefererRepositoryQuery.php
Normal file
28
core/Repository/Analytic/RefererRepositoryQuery.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace App\Core\Repository\Analytic;
|
||||
|
||||
use App\Core\Repository\Analytic\RefererRepository as Repository;
|
||||
use Knp\Component\Pager\PaginatorInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use App\Core\Repository\RepositoryQuery;
|
||||
|
||||
class RefererRepositoryQuery extends RepositoryQuery
|
||||
{
|
||||
public function __construct(Repository $repository, PaginatorInterface $paginator)
|
||||
{
|
||||
parent::__construct($repository, 'n', $paginator);
|
||||
}
|
||||
|
||||
public function filterByRequest(Request $request)
|
||||
{
|
||||
return $this
|
||||
->andWhere('.node = :node')
|
||||
->andWhere('.uri = :uri')
|
||||
->setParameters([
|
||||
':node' => $request->attributes->get('_node'),
|
||||
':uri' => $request->headers->get('referer'),
|
||||
])
|
||||
;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue