| @@ 64-70 (lines=7) @@ | ||
| 61 | ||
| 62 | $queryBuilder = $repository->createQueryBuilder('o'); |
|
| 63 | $queryNameGenerator = new QueryNameGenerator(); |
|
| 64 | foreach ($this->collectionExtensions as $extension) { |
|
| 65 | $extension->applyToCollection($queryBuilder, $queryNameGenerator, $resourceClass, $operationName); |
|
| 66 | ||
| 67 | if ($extension instanceof QueryResultCollectionExtensionInterface && $extension->supportsResult($resourceClass, $operationName)) { |
|
| 68 | return $extension->getResult($queryBuilder); |
|
| 69 | } |
|
| 70 | } |
|
| 71 | ||
| 72 | return $queryBuilder->getQuery()->getResult(); |
|
| 73 | } |
|
| @@ 93-99 (lines=7) @@ | ||
| 90 | ||
| 91 | $this->addWhereForIdentifiers($identifiers, $queryBuilder); |
|
| 92 | ||
| 93 | foreach ($this->itemExtensions as $extension) { |
|
| 94 | $extension->applyToItem($queryBuilder, $queryNameGenerator, $resourceClass, $identifiers, $operationName, $context); |
|
| 95 | ||
| 96 | if ($extension instanceof QueryResultItemExtensionInterface && $extension->supportsResult($resourceClass, $operationName)) { |
|
| 97 | return $extension->getResult($queryBuilder); |
|
| 98 | } |
|
| 99 | } |
|
| 100 | ||
| 101 | return $queryBuilder->getQuery()->getOneOrNullResult(); |
|
| 102 | } |
|