src/Entity/Management/Subscription/TypeOffer.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Management\Subscription;
  3. use App\Entity\Event\Training\Pack;
  4. use App\Repository\Management\Subscription\TypeOfferRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9.  * @ORM\Entity(repositoryClass=TypeOfferRepository::class)
  10.  */
  11. class TypeOffer
  12. {
  13.     const TYPE_OFFER_DECLIC_ID = 7;
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue
  17.      * @ORM\Column(type="integer")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\Column(type="boolean", nullable=true)
  22.      */
  23.     private $online;
  24.     /**
  25.      * @ORM\Column(type="string", length=255)
  26.      */
  27.     private $title;
  28.     /**
  29.      * @ORM\Column(type="string", length=255,nullable=true)
  30.      */
  31.     private $abandonTunnelMailjet;
  32.     /**
  33.      * @ORM\Column(type="string", length=255,nullable=true)
  34.      */
  35.     private $addTunnelMailjet;
  36.     /**
  37.      * @ORM\OneToMany(targetEntity=Offer::class, mappedBy="typeOffer")
  38.      */
  39.     private $offer;
  40.     /**
  41.      * @ORM\Column(name="text_paid",type="text",nullable=true)
  42.      */
  43.     protected $textPaid;
  44.     /**
  45.      * @ORM\Column(type="text",nullable=true)
  46.      */
  47.     private $grab;
  48.     /**
  49.      * @var string $title
  50.      *
  51.      * @ORM\Column(type="string", name="`version_exam`", length=255,nullable=true)
  52.      *
  53.      */
  54.     private $version;
  55.     /**
  56.      * @ORM\Column(type="text",nullable=true)
  57.      */
  58.     protected $description;
  59.     /**
  60.      * @ORM\Column(name="slug",type="string",nullable=true)
  61.      */
  62.     protected $slug;
  63.     /**
  64.      * @var bool
  65.      * @ORM\Column(type="boolean",options={"default":1})
  66.      */
  67.     protected $displayPack = true;
  68.     /**
  69.      *
  70.      * @ORM\ManyToMany(targetEntity="App\Entity\Event\Training\Pack")
  71.      */
  72.     private $packs;
  73.     public function __construct()
  74.     {
  75.         $this->offer = new ArrayCollection();
  76.     }
  77.     public function getId(): ?int
  78.     {
  79.         return $this->id;
  80.     }
  81.     public function getOnline(): ?bool
  82.     {
  83.         return $this->online;
  84.     }
  85.     public function setOnline(?bool $online): self
  86.     {
  87.         $this->online = $online;
  88.         return $this;
  89.     }
  90.     public function getTitle(): ?string
  91.     {
  92.         return $this->title;
  93.     }
  94.     public function setTitle(string $title): self
  95.     {
  96.         $this->title = $title;
  97.         return $this;
  98.     }
  99.     /**
  100.      * @return Collection<int, Offer>
  101.      */
  102.     public function getOffer(): Collection
  103.     {
  104.         return $this->offer;
  105.     }
  106.     public function addOffer(Offer $offer): self
  107.     {
  108.         if (!$this->offer->contains($offer)) {
  109.             $this->offer[] = $offer;
  110.             $offer->setTypeOffer($this);
  111.         }
  112.         return $this;
  113.     }
  114.     public function removeOffer(Offer $offer): self
  115.     {
  116.         if ($this->offer->removeElement($offer)) {
  117.             // set the owning side to null (unless already changed)
  118.             if ($offer->getTypeOffer() === $this) {
  119.                 $offer->setTypeOffer(null);
  120.             }
  121.         }
  122.         return $this;
  123.     }
  124.     /**
  125.      * @return mixed
  126.      */
  127.     public function getTextPaid()
  128.     {
  129.         return $this->textPaid;
  130.     }
  131.     /**
  132.      * @param mixed $textPaid
  133.      */
  134.     public function setTextPaid($textPaid): void
  135.     {
  136.         $this->textPaid = $textPaid;
  137.     }
  138.     /**
  139.      * @return mixed
  140.      */
  141.     public function getSlug()
  142.     {
  143.         return $this->slug;
  144.     }
  145.     /**
  146.      * @param mixed $slug
  147.      */
  148.     public function setSlug($slug): void
  149.     {
  150.         $this->slug = $slug;
  151.     }
  152.     public function getPacks()
  153.     {
  154.         return $this->packs;
  155.     }
  156.     public function setPacks(ArrayCollection $packs): void
  157.     {
  158.         $this->packs = $packs;
  159.     }
  160.     public function addPacks(Pack $packs): void
  161.     {
  162.         if(!$this->packs->contains($packs))
  163.             $this->packs[] = $packs;
  164.     }
  165.     /**
  166.      * @return mixed
  167.      */
  168.     public function getGrab()
  169.     {
  170.         return $this->grab;
  171.     }
  172.     /**
  173.      * @param mixed $grab
  174.      */
  175.     public function setGrab($grab): void
  176.     {
  177.         $this->grab = $grab;
  178.     }
  179.     /**
  180.      * @return mixed
  181.      */
  182.     public function getDescription()
  183.     {
  184.         return $this->description;
  185.     }
  186.     /**
  187.      * @param mixed $description
  188.      */
  189.     public function setDescription($description): void
  190.     {
  191.         $this->description = $description;
  192.     }
  193.     public function isDisplayPack(): bool
  194.     {
  195.         return $this->displayPack;
  196.     }
  197.     public function setDisplayPack(bool $displayPack): void
  198.     {
  199.         $this->displayPack = $displayPack;
  200.     }
  201.     public function getVersion(): ?string
  202.     {
  203.         return $this->version;
  204.     }
  205.     public function setVersion(?string $version): void
  206.     {
  207.         $this->version = $version;
  208.     }
  209.     /**
  210.      * @return mixed
  211.      */
  212.     public function getAbandonTunnelMailjet()
  213.     {
  214.         return $this->abandonTunnelMailjet;
  215.     }
  216.     /**
  217.      * @param mixed $abandonTunnelMailjet
  218.      */
  219.     public function setAbandonTunnelMailjet($abandonTunnelMailjet): void
  220.     {
  221.         $this->abandonTunnelMailjet = $abandonTunnelMailjet;
  222.     }
  223.     /**
  224.      * @return mixed
  225.      */
  226.     public function getAddTunnelMailjet()
  227.     {
  228.         return $this->addTunnelMailjet;
  229.     }
  230.     /**
  231.      * @param mixed $addTunnelMailjet
  232.      */
  233.     public function setAddTunnelMailjet($addTunnelMailjet): void
  234.     {
  235.         $this->addTunnelMailjet = $addTunnelMailjet;
  236.     }
  237. }