Reference
C
Class

ApiPlatform\Doctrine\Orm\Extension\EagerLoadingExtension

Eager loads relations.

class ApiPlatform\Doctrine\Orm\Extension\EagerLoadingExtension implements `<a href="/docs/reference/Doctrine/Orm/Extension/QueryCollectionExtensionInterface">ApiPlatform\Doctrine\Orm\Extension\QueryCollectionExtensionInterface</a>`, `<a href="/docs/reference/Doctrine/Orm/Extension/QueryItemExtensionInterface">ApiPlatform\Doctrine\Orm\Extension\QueryItemExtensionInterface</a>`
{
    public __construct(ApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, int $maxJoins, bool $forceEager, bool $fetchPartial, null|Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface $classMetadataFactory)
    public applyToCollection(Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, null|string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): null
    public applyToItem(Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, array $identifiers, null|ApiPlatform\Metadata\Operation $operation, array $context): null
}
class ApiPlatform\Doctrine\Orm\Extension\EagerLoadingExtension implements `<a href="/docs/reference/Doctrine/Orm/Extension/QueryCollectionExtensionInterface">ApiPlatform\Doctrine\Orm\Extension\QueryCollectionExtensionInterface</a>`, `<a href="/docs/reference/Doctrine/Orm/Extension/QueryItemExtensionInterface">ApiPlatform\Doctrine\Orm\Extension\QueryItemExtensionInterface</a>`
{
    public __construct(ApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, int $maxJoins, bool $forceEager, bool $fetchPartial, null|Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface $classMetadataFactory)
    public applyToCollection(Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, null|string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): null
    public applyToItem(Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, array $identifiers, null|ApiPlatform\Metadata\Operation $operation, array $context): null
}

Methods

__construct

public __construct(ApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, int $maxJoins, bool $forceEager, bool $fetchPartial, null|Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface $classMetadataFactory)
public __construct(ApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, int $maxJoins, bool $forceEager, bool $fetchPartial, null|Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface $classMetadataFactory)

Parameters

propertyNameCollectionFactoryApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface
propertyMetadataFactoryApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface
maxJoinsint
forceEagerbool
fetchPartialbool
classMetadataFactorySymfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface

applyToCollection

public applyToCollection(Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, null|string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): null
public applyToCollection(Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, null|string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): null

Parameters

queryBuilderDoctrine\ORM\QueryBuilder
queryNameGeneratorApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface
resourceClassstring
operationApiPlatform\Metadata\Operation
contextarray

Returns

null

applyToItem

The context may contain serialization groups which helps defining joined entities that are readable.

public applyToItem(Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, array $identifiers, null|ApiPlatform\Metadata\Operation $operation, array $context): null
public applyToItem(Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, array $identifiers, null|ApiPlatform\Metadata\Operation $operation, array $context): null

Parameters

queryBuilderDoctrine\ORM\QueryBuilder
queryNameGeneratorApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface
resourceClassstring
identifiersarray
operationApiPlatform\Metadata\Operation
contextarray

Returns

null

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop