src/Bridge/Doctrine/Orm/CollectionDataProvider.php 1 location
|
@@ 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 |
|
} |
src/Bridge/Doctrine/Orm/ItemDataProvider.php 1 location
|
@@ 89-95 (lines=7) @@
|
| 86 |
|
|
| 87 |
|
$this->addWhereForIdentifiers($identifiers, $queryBuilder, $doctrineClassMetadata); |
| 88 |
|
|
| 89 |
|
foreach ($this->itemExtensions as $extension) { |
| 90 |
|
$extension->applyToItem($queryBuilder, $queryNameGenerator, $resourceClass, $identifiers, $operationName, $context); |
| 91 |
|
|
| 92 |
|
if ($extension instanceof QueryResultItemExtensionInterface && $extension->supportsResult($resourceClass, $operationName)) { |
| 93 |
|
return $extension->getResult($queryBuilder); |
| 94 |
|
} |
| 95 |
|
} |
| 96 |
|
|
| 97 |
|
return $queryBuilder->getQuery()->getOneOrNullResult(); |
| 98 |
|
} |
src/Bridge/Doctrine/Orm/SubresourceDataProvider.php 1 location
|
@@ 112-118 (lines=7) @@
|
| 109 |
|
} |
| 110 |
|
} |
| 111 |
|
} else { |
| 112 |
|
foreach ($this->itemExtensions as $extension) { |
| 113 |
|
$extension->applyToItem($queryBuilder, $queryNameGenerator, $resourceClass, $identifiers, $operationName, $context); |
| 114 |
|
|
| 115 |
|
if ($extension instanceof QueryResultItemExtensionInterface && $extension->supportsResult($resourceClass, $operationName)) { |
| 116 |
|
return $extension->getResult($queryBuilder); |
| 117 |
|
} |
| 118 |
|
} |
| 119 |
|
} |
| 120 |
|
|
| 121 |
|
$query = $queryBuilder->getQuery(); |