src/Entity/FaqQuestion.php line 31

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Repository\FaqQuestionRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * The field is the rank of the question
  8.  * The value is the title of the text
  9.  * @ORM\Entity(repositoryClass=FaqQuestionRepository::class)
  10.  * @ApiResource(
  11.  *     denormalizationContext={
  12.  *          "groups"={"faq_question:write"}
  13.  *     },
  14.  *     normalizationContext={
  15.  *          "groups"={"faq_question:read"}
  16.  *     },
  17.  *     collectionOperations={
  18.  *              "post"={"security"="is_granted('ROLE_ADMIN')"},
  19.  *              "get"={"security"="is_granted('ROLE_USER')"},
  20.  *     },
  21.  *     itemOperations={
  22.  *              "get"={"security"="is_granted('ROLE_USER')"},
  23.  *              "delete"={"security"="is_granted('ROLE_ADMIN')"},
  24.  *              "patch"={"security"="is_granted('ROLE_ADMIN')"},
  25.  *     },
  26.  * )
  27.  */
  28. class FaqQuestion extends TvConfiguration
  29. {
  30. }