From 3d44c86e59cb845fa593783d2a5411a73b744e27 Mon Sep 17 00:00:00 2001 From: Tomek <37069663+flytomek@users.noreply.github.com> Date: Wed, 10 Jan 2024 16:11:28 +0100 Subject: [PATCH] Update loadArticles function in example (#657) --- Resources/doc/overview-page.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Resources/doc/overview-page.md b/Resources/doc/overview-page.md index 62fdaa75..d49006cb 100644 --- a/Resources/doc/overview-page.md +++ b/Resources/doc/overview-page.md @@ -112,7 +112,8 @@ class ArticleOverviewController extends WebsiteController $search = $repository->createSearch() ->addSort(new FieldSort('authored', FieldSort::DESC)) ->setFrom(($page - 1) * $pageSize) - ->setSize($pageSize); + ->setSize($pageSize) + ->addQuery(new TermQuery('locale', $locale)); return $repository->findDocuments($search); }