References PropertyHelperTrait
Reference
T
Trait

ApiPlatform\Doctrine\Odm\PropertyHelperTrait

Helper trait regarding a property in a MongoDB document using the resource metadata.

trait ApiPlatform\Doctrine\Odm\PropertyHelperTrait
{
    protected getManagerRegistry(): Doctrine\Persistence\ManagerRegistry
    protected splitPropertyParts(string $property, string $resourceClass): array
    protected getClassMetadata(string $resourceClass): Doctrine\Persistence\Mapping\ClassMetadata
    protected addLookupsForNestedProperty(string $property, Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass, bool $preserveNullAndEmptyArrays): 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

addLookupsForNestedProperty

Adds the necessary lookups for a nested property.

protected addLookupsForNestedProperty(string $property, Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass, bool $preserveNullAndEmptyArrays): array

Parameters

propertystring
aggregationBuilderDoctrine\ODM\MongoDB\Aggregation\Builder
resourceClassstring
preserveNullAndEmptyArraysbool

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