Applies selected ordering while querying resource collection.
class ApiPlatform\Doctrine\Odm\Extension\OrderExtension implements ApiPlatform\Doctrine\Odm\Extension\AggregationCollectionExtensionInterface
{
public __construct(null|string $order, null|Doctrine\Persistence\ManagerRegistry $managerRegistry)
public applyToCollection(Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): null
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
protected isPropertyMapped(string $property, string $resourceClass, bool $allowAssociation): bool
protected isPropertyNested(string $property, string $resourceClass): bool
protected isPropertyEmbedded(string $property, string $resourceClass): bool
protected getDoctrineFieldType(string $property, string $resourceClass): string
protected getNestedMetadata(string $resourceClass, array<int, string> $associations): Doctrine\Persistence\Mapping\ClassMetadata
}
public __construct(null|string $order, null|Doctrine\Persistence\ManagerRegistry $managerRegistry)
order | string | |
managerRegistry | Doctrine\Persistence\ManagerRegistry |
public applyToCollection(Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): null
aggregationBuilder | Doctrine\ODM\MongoDB\Aggregation\Builder | |
resourceClass | string | |
operation | `ApiPlatform\Metadata\Operation` | |
context | array |
null
protected getManagerRegistry(): Doctrine\Persistence\ManagerRegistry
Doctrine\Persistence\ManagerRegistry
Splits the given property into parts.Returns an array with the following keys:
protected splitPropertyParts(string $property, string $resourceClass): array
property | string | |
resourceClass | string |
array
Gets class metadata for the given resource.
protected getClassMetadata(string $resourceClass): Doctrine\Persistence\Mapping\ClassMetadata
resourceClass | string |
Doctrine\Persistence\Mapping\ClassMetadata
Adds the necessary lookups for a nested property.
protected addLookupsForNestedProperty(string $property, Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass, bool $preserveNullAndEmptyArrays): array
property | string | |
aggregationBuilder | Doctrine\ODM\MongoDB\Aggregation\Builder | |
resourceClass | string | |
preserveNullAndEmptyArrays | bool |
array
Determines whether the given property is mapped.
protected isPropertyMapped(string $property, string $resourceClass, bool $allowAssociation): bool
property | string | |
resourceClass | string | |
allowAssociation | bool |
bool
Determines whether the given property is nested.
protected isPropertyNested(string $property, string $resourceClass): bool
property | string | |
resourceClass | string |
bool
Determines whether the given property is embedded.
protected isPropertyEmbedded(string $property, string $resourceClass): bool
property | string | |
resourceClass | string |
bool
Gets the Doctrine Type of a given property/resourceClass.
protected getDoctrineFieldType(string $property, string $resourceClass): string
property | string | |
resourceClass | string |
string
Gets nested class metadata for the given resource.
protected getNestedMetadata(string $resourceClass, array<int, string> $associations): Doctrine\Persistence\Mapping\ClassMetadata
resourceClass | string | |
associations | array<int, string> |
Doctrine\Persistence\Mapping\ClassMetadata
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