References EagerLoadingExtension
Reference
C
Class

ApiPlatform\Doctrine\Orm\Extension\EagerLoadingExtension

Eager loads relations.

class ApiPlatform\Doctrine\Orm\Extension\EagerLoadingExtension implements , `<a href="/docs/main/references/Doctrine/Orm/Extension/QueryItemExtensionInterface">ApiPlatform\Doctrine\Orm\Extension\QueryItemExtensionInterface
{
    public __construct($propertyNameCollectionFactory, `<a href="/docs/main/references/Metadata/Property/Factory/PropertyMetadataFactoryInterface">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, $queryNameGenerator, null|string $resourceClass, null|`<a href="/docs/main/references/Metadata/Operation">ApiPlatform\Metadata\Operation $operation, array $context): null
    public applyToItem(Doctrine\ORM\QueryBuilder $queryBuilder, $queryNameGenerator, string $resourceClass, array $identifiers, null|`<a href="/docs/main/references/Metadata/Operation">ApiPlatform\Metadata\Operation $operation, array $context): null
}

Methods

__construct

public __construct($propertyNameCollectionFactory, `<a href="/docs/main/references/Metadata/Property/Factory/PropertyMetadataFactoryInterface">ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, int $maxJoins, bool $forceEager, bool $fetchPartial, null|Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface $classMetadataFactory)

Parameters

propertyNameCollectionFactory`ApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface`
propertyMetadataFactory`ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface`
maxJoinsint
forceEagerbool
fetchPartialbool
classMetadataFactorySymfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface

applyToCollection

public applyToCollection(Doctrine\ORM\QueryBuilder $queryBuilder, $queryNameGenerator, null|string $resourceClass, null|`<a href="/docs/main/references/Metadata/Operation">ApiPlatform\Metadata\Operation $operation, array $context): null

Parameters

queryBuilderDoctrine\ORM\QueryBuilder
queryNameGenerator`ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface`
resourceClassstring
operation`ApiPlatform\Metadata\Operation`
contextarray

Returns

null

applyToItem

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

Parameters

queryBuilderDoctrine\ORM\QueryBuilder
queryNameGenerator`ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface`
resourceClassstring
identifiersarray
operation`ApiPlatform\Metadata\Operation`
contextarray

Returns

null

Made with love by

Les-Tilleuls.coop can help you design and develop your APIs and web projects, and train your teams in API Platform, Symfony, Next.js, Kubernetes and a wide range of other technologies.

Learn more

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop