private readonly LoggerInterface
$logger,
private readonly CriteriaFieldsResolver
$criteriaFieldsResolver ) { } /**
* @return EntityCollection<Entity>
*/
public function read(EntityDefinition
$definition, Criteria
$criteria, Context
$context): EntityCollection
{ $criteria->
resetSorting();
$criteria->
resetQueries();
/** @var EntityCollection<Entity> $collectionClass */
$collectionClass =
$definition->
getCollectionClass();
$fields =
$this->criteriaFieldsResolver->
resolve($criteria,
$definition);
return $this->
_read( $criteria,
$definition,
$context,
new $collectionClass(),