<?php
namespace App\Entity\Management\Subscription;
use App\Entity\Event\Training\Pack;
use App\Repository\Management\Subscription\TypeOfferRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=TypeOfferRepository::class)
*/
class TypeOffer
{
const TYPE_OFFER_DECLIC_ID = 7;
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $online;
/**
* @ORM\Column(type="string", length=255)
*/
private $title;
/**
* @ORM\Column(type="string", length=255,nullable=true)
*/
private $abandonTunnelMailjet;
/**
* @ORM\Column(type="string", length=255,nullable=true)
*/
private $addTunnelMailjet;
/**
* @ORM\OneToMany(targetEntity=Offer::class, mappedBy="typeOffer")
*/
private $offer;
/**
* @ORM\Column(name="text_paid",type="text",nullable=true)
*/
protected $textPaid;
/**
* @ORM\Column(type="text",nullable=true)
*/
private $grab;
/**
* @var string $title
*
* @ORM\Column(type="string", name="`version_exam`", length=255,nullable=true)
*
*/
private $version;
/**
* @ORM\Column(type="text",nullable=true)
*/
protected $description;
/**
* @ORM\Column(name="slug",type="string",nullable=true)
*/
protected $slug;
/**
* @var bool
* @ORM\Column(type="boolean",options={"default":1})
*/
protected $displayPack = true;
/**
*
* @ORM\ManyToMany(targetEntity="App\Entity\Event\Training\Pack")
*/
private $packs;
public function __construct()
{
$this->offer = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getOnline(): ?bool
{
return $this->online;
}
public function setOnline(?bool $online): self
{
$this->online = $online;
return $this;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(string $title): self
{
$this->title = $title;
return $this;
}
/**
* @return Collection<int, Offer>
*/
public function getOffer(): Collection
{
return $this->offer;
}
public function addOffer(Offer $offer): self
{
if (!$this->offer->contains($offer)) {
$this->offer[] = $offer;
$offer->setTypeOffer($this);
}
return $this;
}
public function removeOffer(Offer $offer): self
{
if ($this->offer->removeElement($offer)) {
// set the owning side to null (unless already changed)
if ($offer->getTypeOffer() === $this) {
$offer->setTypeOffer(null);
}
}
return $this;
}
/**
* @return mixed
*/
public function getTextPaid()
{
return $this->textPaid;
}
/**
* @param mixed $textPaid
*/
public function setTextPaid($textPaid): void
{
$this->textPaid = $textPaid;
}
/**
* @return mixed
*/
public function getSlug()
{
return $this->slug;
}
/**
* @param mixed $slug
*/
public function setSlug($slug): void
{
$this->slug = $slug;
}
public function getPacks()
{
return $this->packs;
}
public function setPacks(ArrayCollection $packs): void
{
$this->packs = $packs;
}
public function addPacks(Pack $packs): void
{
if(!$this->packs->contains($packs))
$this->packs[] = $packs;
}
/**
* @return mixed
*/
public function getGrab()
{
return $this->grab;
}
/**
* @param mixed $grab
*/
public function setGrab($grab): void
{
$this->grab = $grab;
}
/**
* @return mixed
*/
public function getDescription()
{
return $this->description;
}
/**
* @param mixed $description
*/
public function setDescription($description): void
{
$this->description = $description;
}
public function isDisplayPack(): bool
{
return $this->displayPack;
}
public function setDisplayPack(bool $displayPack): void
{
$this->displayPack = $displayPack;
}
public function getVersion(): ?string
{
return $this->version;
}
public function setVersion(?string $version): void
{
$this->version = $version;
}
/**
* @return mixed
*/
public function getAbandonTunnelMailjet()
{
return $this->abandonTunnelMailjet;
}
/**
* @param mixed $abandonTunnelMailjet
*/
public function setAbandonTunnelMailjet($abandonTunnelMailjet): void
{
$this->abandonTunnelMailjet = $abandonTunnelMailjet;
}
/**
* @return mixed
*/
public function getAddTunnelMailjet()
{
return $this->addTunnelMailjet;
}
/**
* @param mixed $addTunnelMailjet
*/
public function setAddTunnelMailjet($addTunnelMailjet): void
{
$this->addTunnelMailjet = $addTunnelMailjet;
}
}