|
|
|
@ -15,15 +15,21 @@ use Symfony\Component\Serializer\Annotation\Groups; |
|
|
|
|
use Symfony\Component\Validator\Constraints as Assert; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @ApiResource( |
|
|
|
|
* attributes={"security"="is_granted('ROLE_ADMIN')"}, |
|
|
|
|
* normalizationContext={"groups"={"session_category:read"}, "swagger_definition_name"="Read"}, |
|
|
|
|
* denormalizationContext={"groups"={"session_category:write"}}, |
|
|
|
|
* ) |
|
|
|
|
* |
|
|
|
|
* @ORM\Table(name="session_category") |
|
|
|
|
* @ORM\Entity |
|
|
|
|
*/ |
|
|
|
|
#[ApiResource( |
|
|
|
|
attributes: [ |
|
|
|
|
'security' => "is_granted('ROLE_ADMIN')", |
|
|
|
|
], |
|
|
|
|
normalizationContext: [ |
|
|
|
|
'groups' => ['session_category:read'], |
|
|
|
|
'swagger_definition_name' => 'Read', |
|
|
|
|
], |
|
|
|
|
denormalizationContext: [ |
|
|
|
|
'groups' => ['session_category:write'], |
|
|
|
|
], |
|
|
|
|
)] |
|
|
|
|
class SessionCategory |
|
|
|
|
{ |
|
|
|
|
/** |
|
|
|
|