<?php
namespace App\Domain\Entity\Enumeration;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Delete;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use ApiPlatform\Metadata\Post;
use ApiPlatform\Metadata\Put;
use App\Domain\Entity\Enumeration;
/**
* Class PlaceType
*
* @package App\Domain\Entity\Enumeration
*/
#[ApiResource(
operations : [
new Delete(security: "is_granted('ROLE_ADMIN')"),
new Get(),
new GetCollection(filters: ['soft_delete_filter']),
new Post(normalizationContext: ['groups' => ['translations']], security: "is_granted('ROLE_ADMIN')"),
new Put(normalizationContext: ['groups' => ['translations']], security: "is_granted('ROLE_ADMIN')"),
],
normalizationContext : ['groups' => ['enumeration_read']],
denormalizationContext: ['groups' => ['enumeration_write']]
)]
class PlaceType extends Enumeration
{
}