@@ 1367-1381 (lines=15) @@ | ||
1364 | * |
|
1365 | * @return \eZ\Publish\API\Repository\Values\Content\Search\SearchResult |
|
1366 | */ |
|
1367 | protected function sortContent(Repository $repository, SortClause $sortClause) |
|
1368 | { |
|
1369 | $searchService = $repository->getSearchService(); |
|
1370 | ||
1371 | $query = new Query( |
|
1372 | [ |
|
1373 | 'filter' => new Criterion\ContentTypeIdentifier('test-' . $this->getTypeName()), |
|
1374 | 'sortClauses' => [ |
|
1375 | $sortClause, |
|
1376 | ], |
|
1377 | ] |
|
1378 | ); |
|
1379 | ||
1380 | return $searchService->findContent($query); |
|
1381 | } |
|
1382 | ||
1383 | /** |
|
1384 | * Returns SearchResult of the tested Locations for the given $criterion. |
|
@@ 1424-1438 (lines=15) @@ | ||
1421 | * |
|
1422 | * @return \eZ\Publish\API\Repository\Values\Content\Search\SearchResult |
|
1423 | */ |
|
1424 | protected function sortLocations(Repository $repository, SortClause $sortClause) |
|
1425 | { |
|
1426 | $searchService = $repository->getSearchService(); |
|
1427 | ||
1428 | $query = new LocationQuery( |
|
1429 | [ |
|
1430 | 'filter' => new Criterion\ContentTypeIdentifier('test-' . $this->getTypeName()), |
|
1431 | 'sortClauses' => [ |
|
1432 | $sortClause, |
|
1433 | ], |
|
1434 | ] |
|
1435 | ); |
|
1436 | ||
1437 | return $searchService->findLocations($query); |
|
1438 | } |
|
1439 | ||
1440 | /** |
|
1441 | * Returns a list of Content IDs from given $searchResult, with order preserved. |