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): int
public getPage(array $context): int
context | array |
int
Gets the current offset.
public getOffset(null|ApiPlatform\Metadata\Operation $operation, array $context): int
public 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): int
public 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): array
public 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): bool
public 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): bool
public 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): bool
public isPartialEnabled(null|ApiPlatform\Metadata\Operation $operation, array $context): bool
operation | ApiPlatform\Metadata\Operation | |
context | array |
bool
public getOptions(): array
public getOptions(): array
array
public getGraphQlPaginationType(ApiPlatform\Metadata\Operation $operation): string
public getGraphQlPaginationType(ApiPlatform\Metadata\Operation $operation): string
operation | ApiPlatform\Metadata\Operation |
string