Skip to content

Commit e2ed50c

Browse files
authored
Correct the statement above the Entity class
1 parent f4e609c commit e2ed50c

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

core/fosuser-bundle.md

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,7 @@ You need to use serialization groups to hide some properties like `plainPassword
1010
shown are handled with the [`normalization_context`](serialization-groups-and-relations.md#normalization), while the properties
1111
you can modify are handled with [`denormalization_context`](serialization-groups-and-relations.md#denormalization).
1212

13-
First register the following service:
14-
15-
```yaml
16-
# app/config/services.yml
17-
18-
resource.user:
19-
parent: "api.resource"
20-
arguments: [ "AppBundle\Entity\User" ]
21-
calls:
22-
- method: "initNormalizationContext"
23-
arguments: [ { groups: [ "user_read" ] } ]
24-
- method: "initDenormalizationContext"
25-
arguments: [ { groups: [ "user_write" ] } ]
26-
tags: [ { name: "api.resource" } ]
27-
```
28-
29-
Then create your User entity with serialization groups:
13+
Create your User entity with serialization groups:
3014

3115
```php
3216
<?php

0 commit comments

Comments
 (0)