mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-06 07:49:53 +00:00
rename methods for more clarity
This commit is contained in:
parent
dadde29bc2
commit
d6b1216021
@ -34,8 +34,8 @@ class NewsItemHistoryController extends AbstractController
|
|||||||
public function listAction(Request $request): Response
|
public function listAction(Request $request): Response
|
||||||
{
|
{
|
||||||
$filter = $this->buildFilterOrder(false);
|
$filter = $this->buildFilterOrder(false);
|
||||||
$total = $this->newsItemRepository->countAllFilteredByUser($filter->getQueryString());
|
$total = $this->newsItemRepository->countAllFilteredBySearchTerm($filter->getQueryString());
|
||||||
$newsItems = $this->newsItemRepository->findAllFilteredByUser($filter->getQueryString());
|
$newsItems = $this->newsItemRepository->findAllFilteredBySearchTerm($filter->getQueryString());
|
||||||
|
|
||||||
$pagination = $this->paginatorFactory->create($total);
|
$pagination = $this->paginatorFactory->create($total);
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ class NewsItemRepository implements ObjectRepository
|
|||||||
return $qb;
|
return $qb;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findAllFilteredByUser(string $pattern = null)
|
public function findAllFilteredBySearchTerm(string $pattern = null)
|
||||||
{
|
{
|
||||||
$qb = $this->buildBaseQuery($pattern);
|
$qb = $this->buildBaseQuery($pattern);
|
||||||
$qb->addOrderBy('n.startDate', 'DESC')
|
$qb->addOrderBy('n.startDate', 'DESC')
|
||||||
@ -97,7 +97,7 @@ class NewsItemRepository implements ObjectRepository
|
|||||||
->getResult();
|
->getResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function countAllFilteredByUser(string $pattern = null)
|
public function countAllFilteredBySearchTerm(string $pattern = null)
|
||||||
{
|
{
|
||||||
$qb = $this->buildBaseQuery($pattern);
|
$qb = $this->buildBaseQuery($pattern);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user