Skip to content

Commit 7e763b6

Browse files
committed
Use LocationList::getTotalCount() instead of LocationList::$totalCount
1 parent a5e07fe commit 7e763b6

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

code_samples/api/public_php_api/src/Command/FilterLocationCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
4141

4242
$result = $this->locationService->find($filter, []);
4343

44-
$output->writeln('Found ' . $result->totalCount . ' items');
44+
$output->writeln('Found ' . $result->getTotalCount() . ' items');
4545

4646
foreach ($result as $content) {
4747
$output->writeln($content->getContent()->getName());

docs/search/search_api.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@ The same Filter can be applied to find Locations instead of content items, for e
137137
[[= include_file('code_samples/api/public_php_api/src/Command/FilterLocationCommand.php', 32, 52) =]]
138138
```
139139

140-
Notice that the total number of items is retrieved differently for `ContentList` and `LocationList`.
141-
142140
!!! caution
143141

144142
The total count is the total number of matched items, regardless of pagination settings.

0 commit comments

Comments
 (0)