src/Entity/Purse/ItemStep.php line 31

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Purse;
  3. use App\Entity\Participation\Refund;
  4. use App\Repository\Purse\ItemRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use ApiPlatform\Core\Annotation\ApiResource;
  7. /**
  8.  * @ApiResource(
  9.  *      attributes={
  10.  *          "normalization_context"={"groups"={"Purse:io","Purse:output"}},
  11.  *          "denormalization_context"={"groups"={"Purse:io","Purse:input"}}
  12.  *      },
  13.  *     collectionOperations={
  14.  *          "get"={
  15.  *              "method"="GET",
  16.  *              "access_control"="is_granted('ROLE_USER')",
  17.  *          },
  18.  *     },
  19.  *     itemOperations={
  20.  *          "get"={
  21.  *              "method"="GET",
  22.  *              "access_control"="is_granted('ROLE_USER')",
  23.  *          },
  24.  *      }
  25.  * )
  26.  * @ORM\Entity(repositoryClass=ItemRepository::class)
  27.  */
  28. class ItemStep extends Item
  29. {
  30.     /**
  31.      * @ORM\ManyToOne(targetEntity=Refund::class, inversedBy="items")
  32.      * @ORM\JoinColumn(nullable=true, name="burner_id")
  33.      */
  34.     private $refund;
  35.     /**
  36.      * @var string
  37.      * @ORM\Column(type="string", nullable=true)
  38.      */
  39.     private $class;
  40.     public function getRefund(): ?Refund
  41.     {
  42.         return $this->refund;
  43.     }
  44.     public function setRefund(Refund $refund): self
  45.     {
  46.         $this->class Refund::class;
  47.         $this->refund $refund;
  48.         return $this;
  49.     }
  50. }