PHP Класс ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\PaginationExtension

Автор: Kévin Dunglas ([email protected])
Автор: Samuel ROZE ([email protected])
Наследование: implements ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\QueryResultCollectionExtensionInterface
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Doctrine\Common\Persistence\ManagerRegistry $managerRegistry, Symfony\Component\HttpFoundation\RequestStack $requestStack, ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface $resourceMetadataFactory, boolean $enabled = true, boolean $clientEnabled = false, boolean $clientItemsPerPage = false, integer $itemsPerPage = 30, string $pageParameterName = 'page', string $enabledParameterName = 'pagination', string $itemsPerPageParameterName = 'itemsPerPage', integer $maximumItemPerPage = null )
applyToCollection ( Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null )
getResult ( Doctrine\ORM\QueryBuilder $queryBuilder )
supportsResult ( string $resourceClass, string $operationName = null ) : boolean

Приватные методы

Метод Описание
isPaginationEnabled ( Request $request, ResourceMetadata $resourceMetadata, string $operationName = null ) : boolean
useFetchJoinCollection ( Doctrine\ORM\QueryBuilder $queryBuilder ) : boolean Determines whether the Paginator should fetch join collections, if the root entity uses composite identifiers it should not.
useOutputWalkers ( Doctrine\ORM\QueryBuilder $queryBuilder ) : boolean Determines whether output walkers should be used.

Описание методов

__construct() публичный Метод

public __construct ( Doctrine\Common\Persistence\ManagerRegistry $managerRegistry, Symfony\Component\HttpFoundation\RequestStack $requestStack, ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface $resourceMetadataFactory, boolean $enabled = true, boolean $clientEnabled = false, boolean $clientItemsPerPage = false, integer $itemsPerPage = 30, string $pageParameterName = 'page', string $enabledParameterName = 'pagination', string $itemsPerPageParameterName = 'itemsPerPage', integer $maximumItemPerPage = null )
$managerRegistry Doctrine\Common\Persistence\ManagerRegistry
$requestStack Symfony\Component\HttpFoundation\RequestStack
$resourceMetadataFactory ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface
$enabled boolean
$clientEnabled boolean
$clientItemsPerPage boolean
$itemsPerPage integer
$pageParameterName string
$enabledParameterName string
$itemsPerPageParameterName string
$maximumItemPerPage integer

applyToCollection() публичный Метод

public applyToCollection ( Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null )
$queryBuilder Doctrine\ORM\QueryBuilder
$queryNameGenerator ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface
$resourceClass string
$operationName string

getResult() публичный Метод

public getResult ( Doctrine\ORM\QueryBuilder $queryBuilder )
$queryBuilder Doctrine\ORM\QueryBuilder

supportsResult() публичный Метод

public supportsResult ( string $resourceClass, string $operationName = null ) : boolean
$resourceClass string
$operationName string
Результат boolean