if (\
count($pk) === 1
) { $pk =
array_shift($pk);
} $converted[$arrayKey] =
[ 'primaryKey' =>
$pk,
'data' =>
$data,
];
} if ($criteria->
useIdSorting()) { $converted =
$this->
sortByIdArray($criteria->
getIds(),
$converted);
} return new IdSearchResult($total,
$converted,
$criteria,
$context);
} private function addTotalCountMode(Criteria
$criteria, QueryBuilder
$query): void
{ if ($criteria->
getTotalCountMode() !== Criteria::TOTAL_COUNT_MODE_NEXT_PAGES
) { return;
}