mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Remove typing.
Request from https://gitlab.com/Chill-Projet/chill-bundles/-/merge_requests/99
This commit is contained in:
parent
d50d3e0e4b
commit
b41b1346e5
@ -24,11 +24,11 @@ class SocialIssueApiController extends ApiController
|
|||||||
$query->setParameter('now', new DateTimeImmutable());
|
$query->setParameter('now', new DateTimeImmutable());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getQueryResult(string $action, Request $request, string $_format, int $totalItems, PaginatorInterface $paginator, QueryBuilder $queryBuilder): array
|
protected function getQueryResult(string $action, Request $request, string $_format, int $totalItems, PaginatorInterface $paginator, $query)
|
||||||
{
|
{
|
||||||
// Create a lazy generator to avoid performance issues.
|
// Create a lazy generator to avoid performance issues.
|
||||||
$generator = $this->buildRecursively(
|
$generator = $this->buildRecursively(
|
||||||
$queryBuilder->getQuery()->getResult(),
|
$query->getQuery()->getResult(),
|
||||||
static fn (SocialIssue $socialIssue): iterable => $socialIssue->getChildren()
|
static fn (SocialIssue $socialIssue): iterable => $socialIssue->getChildren()
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -45,9 +45,9 @@ class SocialIssueApiController extends ApiController
|
|||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function onPostIndexBuildQuery(string $action, Request $request, string $_format, int $totalItems, PaginatorInterface $paginator, QueryBuilder $queryBuilder): ?Response
|
protected function onPostIndexBuildQuery(string $action, Request $request, string $_format, int $totalItems, PaginatorInterface $paginator, $query): ?Response
|
||||||
{
|
{
|
||||||
$queryBuilder
|
$query
|
||||||
->orderBy("GET_JSON_FIELD_BY_KEY(e.title, :locale)", 'ASC')
|
->orderBy("GET_JSON_FIELD_BY_KEY(e.title, :locale)", 'ASC')
|
||||||
->setParameter(':locale', $request->getLocale());
|
->setParameter(':locale', $request->getLocale());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user