@@ -28,16 +28,16 @@ discard block |
||
| 28 | 28 | new Get(security: 'is_granted(\'ROLE_ADMIN\') or is_granted(\'ROLE_CLIENT\')'), |
| 29 | 29 | new Put( |
| 30 | 30 | security: 'is_granted(\'ROLE_CLIENT\')', |
| 31 | - denormalizationContext: ['groups' => ['product_category:write']] |
|
| 31 | + denormalizationContext: [ 'groups' => [ 'product_category:write' ] ] |
|
| 32 | 32 | ), |
| 33 | 33 | new Delete(security: 'is_granted(\'ROLE_CLIENT\')'), |
| 34 | 34 | new Post(securityPostDenormalize: 'is_granted(\'ROLE_CLIENT\')'), |
| 35 | 35 | new GetCollection(security: 'is_granted(\'ROLE_ADMIN\') or is_granted(\'ROLE_CLIENT\')') |
| 36 | 36 | ], |
| 37 | - formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']], |
|
| 38 | - normalizationContext: ['groups' => ['product_category:read']], |
|
| 39 | - denormalizationContext: ['groups' => ['product_category:write']] |
|
| 40 | -)] |
|
| 37 | + formats: [ 'jsonld', 'json', 'html', 'jsonhal', 'csv' => [ 'text/csv' ] ], |
|
| 38 | + normalizationContext: [ 'groups' => [ 'product_category:read' ] ], |
|
| 39 | + denormalizationContext: [ 'groups' => [ 'product_category:write' ] ] |
|
| 40 | +) ] |
|
| 41 | 41 | class ProductCategory |
| 42 | 42 | { |
| 43 | 43 | /** |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | * }) |
| 60 | 60 | * @Groups({"product_category:read","product_category:write"}) |
| 61 | 61 | */ |
| 62 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['category' => 'exact'])] |
|
| 62 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'category' => 'exact' ]) ] |
|
| 63 | 63 | |
| 64 | 64 | private $category; |
| 65 | 65 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | * }) |
| 73 | 73 | * @Groups({"product_category:read","product_category:write"}) |
| 74 | 74 | */ |
| 75 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['product' => 'exact'])] |
|
| 75 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'product' => 'exact' ]) ] |
|
| 76 | 76 | |
| 77 | 77 | private $product; |
| 78 | 78 | |