public function getProductImpressions($offset,
$limit, ?DateTimeInterface
$from = null, ?DateTimeInterface
$to = null, array
$sort =
[], array
$shopIds =
[]) { $builder =
$this->
createProductImpressionBuilder($offset,
$limit);
if ($from instanceof DateTimeInterface
) { $builder->
andWhere('articleImpression.date >= :fromDate'
) ->
setParameter(':fromDate',
$from->
format('Y-m-d H:i:s'
));
} if ($to instanceof DateTimeInterface
) { $builder->
andWhere('articleImpression.date <= :toDate'
) ->
setParameter(':toDate',
$to->
format('Y-m-d H:i:s'
));
} if ($sort !==
[]) { $this->
addSort($builder,
$sort);
}