src/Entity/Radio.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\RadioRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=RadioRepository::class)
  9.  */
  10. class Radio
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255, nullable=true)
  20.      */
  21.     private $streamLink;
  22.     /**
  23.      * @ORM\Column(type="string", length=255, nullable=true)
  24.      */
  25.     private $title;
  26.     /**
  27.      * @ORM\Column(type="boolean")
  28.      */
  29.     private $isPublic;
  30.     /**
  31.      * @ORM\ManyToMany(targetEntity=Roles::class)
  32.      */
  33.     private $roles;
  34.     /**
  35.      * @ORM\Column(type="boolean", nullable=true)
  36.      */
  37.     private $hasAllCriteria1;
  38.     /**
  39.      * @ORM\Column(type="boolean", nullable=true)
  40.      */
  41.     private $hasAllCriteria2;
  42.     /**
  43.      * @ORM\Column(type="boolean", nullable=true)
  44.      */
  45.     private $hasAllCriteria3;
  46.     /**
  47.      * @ORM\ManyToMany(targetEntity=Criteria1Item::class)
  48.      */
  49.     private $criteria1Items;
  50.     /**
  51.      * @ORM\ManyToMany(targetEntity=Criteria2Item::class)
  52.      */
  53.     private $criteria2Items;
  54.     /**
  55.      * @ORM\ManyToMany(targetEntity=Criteria3Item::class)
  56.      */
  57.     private $criteria3Items;
  58.     public function __construct()
  59.     {
  60.         $this->roles = new ArrayCollection();
  61.         $this->criteria1Items = new ArrayCollection();
  62.         $this->criteria2Items = new ArrayCollection();
  63.         $this->criteria3Items = new ArrayCollection();
  64.     }
  65.     public function getId(): ?int
  66.     {
  67.         return $this->id;
  68.     }
  69.     public function getStreamLink(): ?string
  70.     {
  71.         return $this->streamLink;
  72.     }
  73.     public function setStreamLink(?string $streamLink): self
  74.     {
  75.         $this->streamLink $streamLink;
  76.         return $this;
  77.     }
  78.     public function getTitle(): ?string
  79.     {
  80.         return $this->title;
  81.     }
  82.     public function setTitle(?string $title): self
  83.     {
  84.         $this->title $title;
  85.         return $this;
  86.     }
  87.     public function getIsPublic(): ?bool
  88.     {
  89.         return $this->isPublic;
  90.     }
  91.     public function setIsPublic(bool $isPublic): self
  92.     {
  93.         $this->isPublic $isPublic;
  94.         return $this;
  95.     }
  96.     /**
  97.      * @return Collection<int, Roles>
  98.      */
  99.     public function getRoles(): Collection
  100.     {
  101.         return $this->roles;
  102.     }
  103.     public function addRole(Roles $role): self
  104.     {
  105.         if (!$this->roles->contains($role)) {
  106.             $this->roles[] = $role;
  107.         }
  108.         return $this;
  109.     }
  110.     public function hasAllCriteria1(): ?bool
  111.     {
  112.         return $this->hasAllCriteria1;
  113.     }
  114.     public function setHasAllCriteria1(?bool $hasAllCriteria1): self
  115.     {
  116.         $this->hasAllCriteria1 $hasAllCriteria1;
  117.         return $this;
  118.     }
  119.     public function hasAllCriteria2(): ?bool
  120.     {
  121.         return $this->hasAllCriteria2;
  122.     }
  123.     public function setHasAllCriteria2(?bool $hasAllCriteria2): self
  124.     {
  125.         $this->hasAllCriteria2 $hasAllCriteria2;
  126.         return $this;
  127.     }
  128.     public function hasAllCriteria3(): ?bool
  129.     {
  130.         return $this->hasAllCriteria3;
  131.     }
  132.     public function setHasAllCriteria3(?bool $hasAllCriteria3): self
  133.     {
  134.         $this->hasAllCriteria3 $hasAllCriteria3;
  135.         return $this;
  136.     }
  137.     /**
  138.      * @return Collection<int, Criteria1Item>
  139.      */
  140.     public function getCriteria1Items(): Collection
  141.     {
  142.         return $this->criteria1Items;
  143.     }
  144.     public function addCriteria1Item(Criteria1Item $criteria1Item): self
  145.     {
  146.         if (!$this->criteria1Items->contains($criteria1Item)) {
  147.             $this->criteria1Items[] = $criteria1Item;
  148.         }
  149.         return $this;
  150.     }
  151.     /**
  152.      * @return Collection<int, Criteria2Item>
  153.      */
  154.     public function getCriteria2Items(): Collection
  155.     {
  156.         return $this->criteria2Items;
  157.     }
  158.     public function addCriteria2Item(Criteria2Item $criteria2Item): self
  159.     {
  160.         if (!$this->criteria2Items->contains($criteria2Item)) {
  161.             $this->criteria2Items[] = $criteria2Item;
  162.         }
  163.         return $this;
  164.     }
  165.     /**
  166.      * @return Collection<int, Criteria3Item>
  167.      */
  168.     public function getCriteria3Items(): Collection
  169.     {
  170.         return $this->criteria3Items;
  171.     }
  172.     public function addCriteria3Item(Criteria3Item $criteria3Item): self
  173.     {
  174.         if (!$this->criteria3Items->contains($criteria3Item)) {
  175.             $this->criteria3Items[] = $criteria3Item;
  176.         }
  177.         return $this;
  178.     }
  179. }