Api Platform conference
Register now
References PropertyHelperTrait
API Platform Conference
September 19-20, 2024 | Lille & online

The international conference on the API Platform Framework

API Platform Conference 2024: meet the best PHP, JavaScript and API experts

Learn more about the event, register for the conference, and get ready for two days of inspiration, ideas, and knowledge-sharing with our incredible lineup of renowned specialists and advocates.

Register now
Reference
T
Trait

ApiPlatform\Doctrine\Orm\PropertyHelperTrait

Helper trait regarding a property in an entity using the resource metadata.

trait ApiPlatform\Doctrine\Orm\PropertyHelperTrait
{
    protected getManagerRegistry(): Doctrine\Persistence\ManagerRegistry
    protected splitPropertyParts(string $property, string $resourceClass): array
    protected getClassMetadata(string $resourceClass): Doctrine\Persistence\Mapping\ClassMetadata
    protected addJoinsForNestedProperty(string $property, string $rootAlias, Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $joinType): array
}

Methods

getManagerRegistry

protected getManagerRegistry(): Doctrine\Persistence\ManagerRegistry

Returns

Doctrine\Persistence\ManagerRegistry

splitPropertyParts

Splits the given property into parts.

protected splitPropertyParts(string $property, string $resourceClass): array

Parameters

propertystring
resourceClassstring

Returns

array

getClassMetadata

Gets class metadata for the given resource.

protected getClassMetadata(string $resourceClass): Doctrine\Persistence\Mapping\ClassMetadata

Parameters

resourceClassstring

Returns

Doctrine\Persistence\Mapping\ClassMetadata

addJoinsForNestedProperty

Adds the necessary joins for a nested property.

protected addJoinsForNestedProperty(string $property, string $rootAlias, Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $joinType): array

Parameters

propertystring
rootAliasstring
queryBuilderDoctrine\ORM\QueryBuilder
queryNameGenerator`ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface`
resourceClassstring
joinTypestring

Returns

array

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