Reference
C
Class

ApiPlatform\Doctrine\Odm\Extension\PaginationExtension

Applies pagination on the Doctrine aggregation for resource collection when enabled.

class ApiPlatform\Doctrine\Odm\Extension\PaginationExtension implements `<a href="/docs/reference/Doctrine/Odm/Extension/AggregationResultCollectionExtensionInterface">ApiPlatform\Doctrine\Odm\Extension\AggregationResultCollectionExtensionInterface</a>`, `<a href="/docs/reference/Doctrine/Odm/Extension/AggregationCollectionExtensionInterface">ApiPlatform\Doctrine\Odm\Extension\AggregationCollectionExtensionInterface</a>`
{
    public __construct(Doctrine\Persistence\ManagerRegistry $managerRegistry, ApiPlatform\State\Pagination\Pagination $pagination)
    public applyToCollection(Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): null
    public supportsResult(string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): bool
    public getResult(Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): iterable
}
class ApiPlatform\Doctrine\Odm\Extension\PaginationExtension implements `<a href="/docs/reference/Doctrine/Odm/Extension/AggregationResultCollectionExtensionInterface">ApiPlatform\Doctrine\Odm\Extension\AggregationResultCollectionExtensionInterface</a>`, `<a href="/docs/reference/Doctrine/Odm/Extension/AggregationCollectionExtensionInterface">ApiPlatform\Doctrine\Odm\Extension\AggregationCollectionExtensionInterface</a>`
{
    public __construct(Doctrine\Persistence\ManagerRegistry $managerRegistry, ApiPlatform\State\Pagination\Pagination $pagination)
    public applyToCollection(Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): null
    public supportsResult(string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): bool
    public getResult(Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): iterable
}

Methods

__construct

public __construct(Doctrine\Persistence\ManagerRegistry $managerRegistry, ApiPlatform\State\Pagination\Pagination $pagination)
public __construct(Doctrine\Persistence\ManagerRegistry $managerRegistry, ApiPlatform\State\Pagination\Pagination $pagination)

Parameters

managerRegistryDoctrine\Persistence\ManagerRegistry
paginationApiPlatform\State\Pagination\Pagination

applyToCollection

public applyToCollection(Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): null
public applyToCollection(Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): null

Parameters

aggregationBuilderDoctrine\ODM\MongoDB\Aggregation\Builder
resourceClassstring
operationApiPlatform\Metadata\Operation
contextarray

Returns

null

supportsResult

public supportsResult(string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): bool
public supportsResult(string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): bool

Parameters

resourceClassstring
operationApiPlatform\Metadata\Operation
contextarray

Returns

bool

getResult

public getResult(Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): iterable
public getResult(Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): iterable

Parameters

aggregationBuilderDoctrine\ODM\MongoDB\Aggregation\Builder
resourceClassstring
operationApiPlatform\Metadata\Operation
contextarray

Returns

iterable

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop