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 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): array
}
trait ApiPlatform\Doctrine\Odm\PropertyHelperTrait
{
    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): array
}

Methods

splitPropertyParts

Splits the given property into parts.

protected splitPropertyParts(string $property, string $resourceClass): array
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
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): array
protected addLookupsForNestedProperty(string $property, Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass): array

Parameters

propertystring
aggregationBuilderDoctrine\ODM\MongoDB\Aggregation\Builder
resourceClassstring

Returns

array

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop