refactor(core) : AuditLog herite du standard de pagination global (10/50)
This commit is contained in:
@@ -29,18 +29,16 @@ use App\Module\Core\Infrastructure\ApiPlatform\State\Provider\AuditLogProvider;
|
|||||||
* ?performed_at[after]=2026-04-01T00:00:00Z
|
* ?performed_at[after]=2026-04-01T00:00:00Z
|
||||||
* ?performed_at[before]=2026-04-30T23:59:59Z
|
* ?performed_at[before]=2026-04-30T23:59:59Z
|
||||||
*
|
*
|
||||||
* La pagination est assuree par le provider via DbalPaginator (implementant
|
* La pagination herite du standard global (10 items / page, max 50, cf.
|
||||||
* ApiPlatform\State\Pagination\PaginatorInterface), ce qui genere
|
* `config/packages/api_platform.yaml`). Elle est materialisee par le
|
||||||
* automatiquement hydra:view — aucune construction manuelle.
|
* DbalPaginator du provider qui implemente PaginatorInterface — API Platform
|
||||||
|
* genere automatiquement hydra:view sans construction manuelle.
|
||||||
*/
|
*/
|
||||||
#[ApiResource(
|
#[ApiResource(
|
||||||
shortName: 'AuditLog',
|
shortName: 'AuditLog',
|
||||||
operations: [
|
operations: [
|
||||||
new GetCollection(
|
new GetCollection(
|
||||||
uriTemplate: '/audit-logs',
|
uriTemplate: '/audit-logs',
|
||||||
paginationItemsPerPage: 30,
|
|
||||||
paginationClientItemsPerPage: true,
|
|
||||||
paginationMaximumItemsPerPage: 50,
|
|
||||||
security: "is_granted('core.audit_log.view')",
|
security: "is_granted('core.audit_log.view')",
|
||||||
provider: AuditLogProvider::class,
|
provider: AuditLogProvider::class,
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user