PHP Class ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\EagerLoadingExtension

Author: Charles Sarrazin ([email protected])
Author: Kévin Dunglas ([email protected])
Author: Antoine Bluchet ([email protected])
Author: Baptiste Meyer ([email protected])
Inheritance: implements ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\QueryCollectionExtensionInterface, implements ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\QueryItemExtensionInterface
Datei anzeigen Open project: api-platform/core Class Usage Examples

Public Methods

Method Description
__construct ( ApiPlatform\Core\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface $resourceMetadataFactory, integer $maxJoins = 30, boolean $forceEager = true )
applyToCollection ( Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null )
applyToItem ( Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, array $identifiers, string $operationName = null, array $context = [] ) {@inheritdoc} The context may contain serialization groups which helps defining joined entities that are readable.

Private Methods

Method Description
addSelect ( Doctrine\ORM\QueryBuilder $queryBuilder, string $entity, string $associationAlias, array $propertyMetadataOptions )
getSerializerGroups ( string $resourceClass, array $options, string $context ) : array Gets serializer groups if available, if not it returns the $options array.
isForceEager ( string $resourceClass, array $options ) : boolean Does an operation force eager?
joinRelations ( Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, boolean $forceEager, string $parentAlias, array $propertyMetadataOptions = [], boolean $wasLeftJoin = false, integer &$joinCount ) Joins relations to eager load.

Method Details

__construct() public method

public __construct ( ApiPlatform\Core\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface $resourceMetadataFactory, integer $maxJoins = 30, boolean $forceEager = true )
$propertyNameCollectionFactory ApiPlatform\Core\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface
$propertyMetadataFactory ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface
$resourceMetadataFactory ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface
$maxJoins integer
$forceEager boolean

applyToCollection() public method

public applyToCollection ( Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null )
$queryBuilder Doctrine\ORM\QueryBuilder
$queryNameGenerator ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface
$resourceClass string
$operationName string

applyToItem() public method

{@inheritdoc} The context may contain serialization groups which helps defining joined entities that are readable.
public applyToItem ( Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, array $identifiers, string $operationName = null, array $context = [] )
$queryBuilder Doctrine\ORM\QueryBuilder
$queryNameGenerator ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface
$resourceClass string
$identifiers array
$operationName string
$context array