Reference
C
Class

ApiPlatform\Doctrine\Orm\Extension\PaginationExtension

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

class ApiPlatform\Doctrine\Orm\Extension\PaginationExtension implements `<a href="/docs/reference/Doctrine/Orm/Extension/QueryResultCollectionExtensionInterface">ApiPlatform\Doctrine\Orm\Extension\QueryResultCollectionExtensionInterface</a>`, `<a href="/docs/reference/Doctrine/Orm/Extension/QueryCollectionExtensionInterface">ApiPlatform\Doctrine\Orm\Extension\QueryCollectionExtensionInterface</a>`
{
    public __construct(Doctrine\Persistence\ManagerRegistry $managerRegistry, null|ApiPlatform\State\Pagination\Pagination $pagination)
    public applyToCollection(Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, 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\ORM\QueryBuilder $queryBuilder, null|string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): iterable
}
class ApiPlatform\Doctrine\Orm\Extension\PaginationExtension implements `<a href="/docs/reference/Doctrine/Orm/Extension/QueryResultCollectionExtensionInterface">ApiPlatform\Doctrine\Orm\Extension\QueryResultCollectionExtensionInterface</a>`, `<a href="/docs/reference/Doctrine/Orm/Extension/QueryCollectionExtensionInterface">ApiPlatform\Doctrine\Orm\Extension\QueryCollectionExtensionInterface</a>`
{
    public __construct(Doctrine\Persistence\ManagerRegistry $managerRegistry, null|ApiPlatform\State\Pagination\Pagination $pagination)
    public applyToCollection(Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, 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\ORM\QueryBuilder $queryBuilder, null|string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): iterable
}

Methods

__construct

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

Parameters

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

applyToCollection

public applyToCollection(Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): null
public applyToCollection(Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): null

Parameters

queryBuilderDoctrine\ORM\QueryBuilder
queryNameGeneratorApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface
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\ORM\QueryBuilder $queryBuilder, null|string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): iterable
public getResult(Doctrine\ORM\QueryBuilder $queryBuilder, null|string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): iterable

Parameters

queryBuilderDoctrine\ORM\QueryBuilder
resourceClassstring
operationApiPlatform\Metadata\Operation
contextarray

Returns

iterable

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop