protected $entityManager;
public function __construct(string
$entity, ModelManager
$entityManager) { $this->entity =
$entity;
$this->entityManager =
$entityManager;
} public function getList($identifiers) { $query =
$this->
createListQuery();
$query->
andWhere($this->
getIdentifierField() . ' IN (:ids)'
);
$query->
setParameter('ids',
$identifiers, Connection::PARAM_STR_ARRAY
);
$data =
$query->
getQuery()->
getArrayResult();
$result =
[];
$identifiers =
array_map(function D
$identifier): string
{ return strtolower((string) $identifier);
},
$identifiers);
$data =
array_change_key_case($data, CASE_LOWER
);
$identifierFields =
explode('.',
$this->
getIdentifierField());
$identifierField =
array_pop($identifierFields);