| @@ 2073-2091 (lines=19) @@ | ||
| 2070 | ||
| 2071 | $defaults = [null, null, null, 'eng-GB', false]; |
|
| 2072 | $contentIdList = []; |
|
| 2073 | foreach ($contentDataList as $key => $contentData) { |
|
| 2074 | $contentData = $contentData + $defaults; |
|
| 2075 | list( |
|
| 2076 | $fieldValue11, |
|
| 2077 | $fieldValue12, |
|
| 2078 | $fieldValue2, |
|
| 2079 | $mainLanguageCode, |
|
| 2080 | $alwaysAvailable |
|
| 2081 | ) = $contentData; |
|
| 2082 | ||
| 2083 | $contentIdList[$key] = $this->createMultilingualContent( |
|
| 2084 | $contentType, |
|
| 2085 | $fieldValue11, |
|
| 2086 | $fieldValue12, |
|
| 2087 | $fieldValue2, |
|
| 2088 | $mainLanguageCode, |
|
| 2089 | $alwaysAvailable |
|
| 2090 | )->id; |
|
| 2091 | } |
|
| 2092 | ||
| 2093 | // "article" type Content is not matched, this ensures that non-matched |
|
| 2094 | // field does not affect sort |
|
| @@ 2362-2380 (lines=19) @@ | ||
| 2359 | ||
| 2360 | $defaults = [null, null, null, 'eng-GB', false]; |
|
| 2361 | $contentIdList = []; |
|
| 2362 | foreach ($contentDataList as $key => $contentData) { |
|
| 2363 | $contentData = $contentData + $defaults; |
|
| 2364 | list( |
|
| 2365 | $fieldValue11, |
|
| 2366 | $fieldValue12, |
|
| 2367 | $fieldValue2, |
|
| 2368 | $mainLanguageCode, |
|
| 2369 | $alwaysAvailable |
|
| 2370 | ) = $contentData; |
|
| 2371 | ||
| 2372 | $contentIdList[$key] = $this->createMultilingualContent( |
|
| 2373 | $contentType, |
|
| 2374 | $fieldValue11, |
|
| 2375 | $fieldValue12, |
|
| 2376 | $fieldValue2, |
|
| 2377 | $mainLanguageCode, |
|
| 2378 | $alwaysAvailable |
|
| 2379 | )->id; |
|
| 2380 | } |
|
| 2381 | ||
| 2382 | $sortClause = new SortClause\Field('test-type', 'integer', Query::SORT_DESC); |
|
| 2383 | $searchService = $repository->getSearchService(); |
|