| @@ 228-243 (lines=16) @@ | ||
| 225 | * @return Content[] |
|
| 226 | * @deprecated |
|
| 227 | */ |
|
| 228 | protected function findContentsByParentLocationIds($parentLocationIds) |
|
| 229 | { |
|
| 230 | $query = new Query(); |
|
| 231 | $query->limit = self::INT_MAX_16BIT; |
|
| 232 | if (isset($query->performCount)) $query->performCount = false; |
|
| 233 | $query->filter = new Query\Criterion\ParentLocationId($parentLocationIds); |
|
| 234 | $results = $this->repository->getSearchService()->findContent($query); |
|
| 235 | ||
| 236 | $contents = []; |
|
| 237 | foreach ($results->searchHits as $result) { |
|
| 238 | // make sure we return every object only once |
|
| 239 | $contents[$result->valueObject->contentInfo->id] = $result->valueObject; |
|
| 240 | } |
|
| 241 | ||
| 242 | return $contents; |
|
| 243 | } |
|
| 244 | ||
| 245 | /** |
|
| 246 | * @param string[] $remoteParentLocationIds |
|
| @@ 217-233 (lines=17) @@ | ||
| 214 | * @return Location[] |
|
| 215 | * @deprecated |
|
| 216 | */ |
|
| 217 | protected function findLocationsByParentLocationIds($parentLocationIds) |
|
| 218 | { |
|
| 219 | $query = new LocationQuery(); |
|
| 220 | $query->limit = self::INT_MAX_16BIT; |
|
| 221 | if (isset($query->performCount)) $query->performCount = false; |
|
| 222 | $query->filter = new Query\Criterion\ParentLocationId($parentLocationIds); |
|
| 223 | ||
| 224 | $results = $this->repository->getSearchService()->findLocations($query); |
|
| 225 | ||
| 226 | $locations = []; |
|
| 227 | ||
| 228 | foreach ($results->searchHits as $result) { |
|
| 229 | $locations[$result->valueObject->id] = $result->valueObject; |
|
| 230 | } |
|
| 231 | ||
| 232 | return $locations; |
|
| 233 | } |
|
| 234 | ||
| 235 | /** |
|
| 236 | * @param int[] $parentLocationRemoteIds |
|