symfony_apiplatform
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| symfony_apiplatform [2020/12/10 14:43] – ssm2017 | symfony_apiplatform [2022/02/07 13:29] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 46: | Line 46: | ||
| ==== disable operations ==== | ==== disable operations ==== | ||
| + | in entity class header | ||
| <sxh php> | <sxh php> | ||
| * @ApiResource( | * @ApiResource( | ||
| Line 53: | Line 54: | ||
| </ | </ | ||
| - | {{tag> | + | ==== read/write properties ==== |
| + | in entity class header | ||
| + | |||
| + | * normalisation = from server to client | ||
| + | * denormalisation = from client to server | ||
| + | <sxh php> | ||
| + | /** | ||
| + | * @ApiResource( | ||
| + | | ||
| + | | ||
| + | * ) | ||
| + | * @ORM\Entity(repositoryClass=" | ||
| + | */ | ||
| + | class Article | ||
| + | { | ||
| + | /** | ||
| + | * @ORM\Id() | ||
| + | * @ORM\GeneratedValue() | ||
| + | * @ORM\Column(type=" | ||
| + | * | ||
| + | * @Groups(" | ||
| + | */ | ||
| + | private $id; | ||
| + | |||
| + | /** | ||
| + | * @ORM\Column(type=" | ||
| + | * | ||
| + | * @Groups({" | ||
| + | */ | ||
| + | private $title; | ||
| + | </ | ||
| + | |||
| + | {{tag> | ||
symfony_apiplatform.1607607795.txt.gz · Last modified: (external edit)
