Guides
Tutorials
Pagination configuration.
class ApiPlatform\State\Pagination\Pagination
{
public __construct(array $options, array $graphQlOptions)
public getPage(array $context): int
public getOffset(null|ApiPlatform\Metadata\Operation $operation, array $context): int
public getLimit(null|ApiPlatform\Metadata\Operation $operation, array $context): int
public getPagination(null|ApiPlatform\Metadata\Operation $operation, array $context): array
public isEnabled(null|ApiPlatform\Metadata\Operation $operation, array $context): bool
public isGraphQlEnabled(null|ApiPlatform\Metadata\Operation $operation, array $context): bool
public isPartialEnabled(null|ApiPlatform\Metadata\Operation $operation, array $context): bool
public getOptions(): array
public getGraphQlPaginationType(ApiPlatform\Metadata\Operation $operation): string
}class ApiPlatform\State\Pagination\Pagination
{
public __construct(array $options, array $graphQlOptions)
public getPage(array $context): int
public getOffset(null|ApiPlatform\Metadata\Operation $operation, array $context): int
public getLimit(null|ApiPlatform\Metadata\Operation $operation, array $context): int
public getPagination(null|ApiPlatform\Metadata\Operation $operation, array $context): array
public isEnabled(null|ApiPlatform\Metadata\Operation $operation, array $context): bool
public isGraphQlEnabled(null|ApiPlatform\Metadata\Operation $operation, array $context): bool
public isPartialEnabled(null|ApiPlatform\Metadata\Operation $operation, array $context): bool
public getOptions(): array
public getGraphQlPaginationType(ApiPlatform\Metadata\Operation $operation): string
}public __construct(array $options, array $graphQlOptions)public __construct(array $options, array $graphQlOptions)| options | array | |
| graphQlOptions | array |
Gets the current page.
public getPage(array $context): intpublic getPage(array $context): int| context | array |
int
Gets the current offset.
public getOffset(null|ApiPlatform\Metadata\Operation $operation, array $context): intpublic getOffset(null|ApiPlatform\Metadata\Operation $operation, array $context): int| operation | ApiPlatform\Metadata\Operation | |
| context | array |
int
Gets the current limit.
public getLimit(null|ApiPlatform\Metadata\Operation $operation, array $context): intpublic getLimit(null|ApiPlatform\Metadata\Operation $operation, array $context): int| operation | ApiPlatform\Metadata\Operation | |
| context | array |
int
Gets info about the pagination.Returns an array with the following info as values:
public getPagination(null|ApiPlatform\Metadata\Operation $operation, array $context): arraypublic getPagination(null|ApiPlatform\Metadata\Operation $operation, array $context): array| operation | ApiPlatform\Metadata\Operation | |
| context | array |
array
Is the pagination enabled?
public isEnabled(null|ApiPlatform\Metadata\Operation $operation, array $context): boolpublic isEnabled(null|ApiPlatform\Metadata\Operation $operation, array $context): bool| operation | ApiPlatform\Metadata\Operation | |
| context | array |
bool
Is the pagination enabled for GraphQL?
public isGraphQlEnabled(null|ApiPlatform\Metadata\Operation $operation, array $context): boolpublic isGraphQlEnabled(null|ApiPlatform\Metadata\Operation $operation, array $context): bool| operation | ApiPlatform\Metadata\Operation | |
| context | array |
bool
Is the partial pagination enabled?
public isPartialEnabled(null|ApiPlatform\Metadata\Operation $operation, array $context): boolpublic isPartialEnabled(null|ApiPlatform\Metadata\Operation $operation, array $context): bool| operation | ApiPlatform\Metadata\Operation | |
| context | array |
bool
public getOptions(): arraypublic getOptions(): arrayarray
public getGraphQlPaginationType(ApiPlatform\Metadata\Operation $operation): stringpublic getGraphQlPaginationType(ApiPlatform\Metadata\Operation $operation): string| operation | ApiPlatform\Metadata\Operation |
string