@@ -47,7 +47,6 @@ discard block |
||
| 47 | 47 | * @ORM\Id |
| 48 | 48 | * @ORM\GeneratedValue(strategy="IDENTITY") |
| 49 | 49 | * @Groups({"product:read","product_group_product:read","product_group:read","product_unity:read"}) |
| 50 | - |
|
| 51 | 50 | */ |
| 52 | 51 | private $id; |
| 53 | 52 | |
@@ -56,7 +55,6 @@ discard block |
||
| 56 | 55 | * |
| 57 | 56 | * @ORM\Column(name="product_unit", type="string", length=3, nullable=false) |
| 58 | 57 | * @Groups({"product:read","product_group_product:read","product_group:read","product_unity:read"}) |
| 59 | - |
|
| 60 | 58 | */ |
| 61 | 59 | private $productUnit; |
| 62 | 60 | |
@@ -26,16 +26,16 @@ discard block |
||
| 26 | 26 | new Get(security: 'is_granted(\'ROLE_ADMIN\') or is_granted(\'ROLE_CLIENT\')'), |
| 27 | 27 | new Put( |
| 28 | 28 | security: 'is_granted(\'ROLE_CLIENT\')', |
| 29 | - denormalizationContext: ['groups' => ['product_file:write']] |
|
| 29 | + denormalizationContext: [ 'groups' => [ 'product_file:write' ] ] |
|
| 30 | 30 | ), |
| 31 | 31 | new Delete(security: 'is_granted(\'ROLE_CLIENT\')'), |
| 32 | 32 | new Post(securityPostDenormalize: 'is_granted(\'ROLE_CLIENT\')'), |
| 33 | 33 | new GetCollection(security: 'is_granted(\'ROLE_ADMIN\') or is_granted(\'ROLE_CLIENT\')') |
| 34 | 34 | ], |
| 35 | - formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']], |
|
| 36 | - normalizationContext: ['groups' => ['product_file:read']], |
|
| 37 | - denormalizationContext: ['groups' => ['product_file:write']] |
|
| 38 | -)] |
|
| 35 | + formats: [ 'jsonld', 'json', 'html', 'jsonhal', 'csv' => [ 'text/csv' ] ], |
|
| 36 | + normalizationContext: [ 'groups' => [ 'product_file:read' ] ], |
|
| 37 | + denormalizationContext: [ 'groups' => [ 'product_file:write' ] ] |
|
| 38 | +) ] |
|
| 39 | 39 | class ProductFile |
| 40 | 40 | { |
| 41 | 41 | /** |
@@ -57,8 +57,8 @@ discard block |
||
| 57 | 57 | * }) |
| 58 | 58 | * @Groups({"product:read","product_file:read","product_file:write","product_category:read"}) |
| 59 | 59 | */ |
| 60 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['file' => 'exact'])] |
|
| 61 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['file.fileType' => 'exact'])] |
|
| 60 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'file' => 'exact' ]) ] |
|
| 61 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'file.fileType' => 'exact' ]) ] |
|
| 62 | 62 | |
| 63 | 63 | private $file; |
| 64 | 64 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | * }) |
| 72 | 72 | * @Groups({"product_file:read","product_file:write"}) |
| 73 | 73 | */ |
| 74 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['product' => 'exact'])] |
|
| 74 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'product' => 'exact' ]) ] |
|
| 75 | 75 | |
| 76 | 76 | private $product; |
| 77 | 77 | |
@@ -30,16 +30,16 @@ discard block |
||
| 30 | 30 | ), |
| 31 | 31 | new Put( |
| 32 | 32 | security: 'is_granted(\'ROLE_CLIENT\')', |
| 33 | - denormalizationContext: ['groups' => ['product:write']] |
|
| 33 | + denormalizationContext: [ 'groups' => [ 'product:write' ] ] |
|
| 34 | 34 | ), |
| 35 | 35 | new Delete(security: 'is_granted(\'ROLE_CLIENT\')'), |
| 36 | 36 | new Post(securityPostDenormalize: 'is_granted(\'ROLE_CLIENT\')'), |
| 37 | 37 | new GetCollection(security: 'is_granted(\'ROLE_ADMIN\') or is_granted(\'ROLE_CLIENT\')') |
| 38 | 38 | ], |
| 39 | - formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']], |
|
| 40 | - normalizationContext: ['groups' => ['product:read']], |
|
| 41 | - denormalizationContext: ['groups' => ['product:write']] |
|
| 42 | -)] |
|
| 39 | + formats: [ 'jsonld', 'json', 'html', 'jsonhal', 'csv' => [ 'text/csv' ] ], |
|
| 40 | + normalizationContext: [ 'groups' => [ 'product:read' ] ], |
|
| 41 | + denormalizationContext: [ 'groups' => [ 'product:write' ] ] |
|
| 42 | +) ] |
|
| 43 | 43 | |
| 44 | 44 | |
| 45 | 45 | class Product |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * @ORM\GeneratedValue(strategy="IDENTITY") |
| 53 | 53 | * @Groups({"product_category:read","product:read","order_product:read"}) |
| 54 | 54 | */ |
| 55 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['id' => 'exact'])] |
|
| 55 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'id' => 'exact' ]) ] |
|
| 56 | 56 | |
| 57 | 57 | private $id; |
| 58 | 58 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | * @ORM\Column(name="product", type="string", length=255, nullable=false) |
| 63 | 63 | * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"}) |
| 64 | 64 | */ |
| 65 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['product' => 'partial'])] |
|
| 65 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'product' => 'partial' ]) ] |
|
| 66 | 66 | |
| 67 | 67 | private $product; |
| 68 | 68 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | * @ORM\Column(name="sku", type="string", length=32, nullable=true, options={"default"="NULL"}) |
| 79 | 79 | * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"}) |
| 80 | 80 | */ |
| 81 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['sku' => 'partial'])] |
|
| 81 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'sku' => 'partial' ]) ] |
|
| 82 | 82 | |
| 83 | 83 | private $sku = NULL; |
| 84 | 84 | |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | * @ORM\Column(name="type", type="string", length=0, nullable=false, options={"default"="'product'"}) |
| 89 | 89 | * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"}) |
| 90 | 90 | */ |
| 91 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['type' => 'exact'])] |
|
| 91 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'type' => 'exact' ]) ] |
|
| 92 | 92 | private $type = 'product'; |
| 93 | 93 | |
| 94 | 94 | /** |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | * @ORM\Column(name="product_condition", type="string", length=0, nullable=false, options={"default"="'new'"}) |
| 106 | 106 | * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"}) |
| 107 | 107 | */ |
| 108 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['productCondition' => 'exact'])] |
|
| 108 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'productCondition' => 'exact' ]) ] |
|
| 109 | 109 | |
| 110 | 110 | private $productCondition = 'new'; |
| 111 | 111 | |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | * @ORM\Column(name="active", type="boolean", nullable=false, options={"default"="1"}) |
| 125 | 125 | * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"}) |
| 126 | 126 | */ |
| 127 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['active' => 'exact'])] |
|
| 127 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'active' => 'exact' ]) ] |
|
| 128 | 128 | |
| 129 | 129 | private $active = true; |
| 130 | 130 | |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | * }) |
| 138 | 138 | * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"}) |
| 139 | 139 | */ |
| 140 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['company' => 'exact'])] |
|
| 140 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'company' => 'exact' ]) ] |
|
| 141 | 141 | |
| 142 | 142 | private $company; |
| 143 | 143 | |