src/Entity/Criteria2Item.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\Criteria2ItemRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=Criteria2ItemRepository::class)
  9.  */
  10. class Criteria2Item
  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)
  20.      */
  21.     private $label;
  22.     /**
  23.      * @ORM\Column(type="string", length=255)
  24.      */
  25.     private $code;
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity=Criteria2::class, inversedBy="criteria2Items")
  28.      * @ORM\JoinColumn(nullable=false)
  29.      */
  30.     private $criteria2;
  31.     /**
  32.      * @ORM\ManyToMany(targetEntity=BlogPostCategory::class, mappedBy="criteria1Items")
  33.      */
  34.     private $blogPostCategories;
  35.     public function __construct()
  36.     {
  37.         $this->blogPostCategories = new ArrayCollection();
  38.     }
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getLabel(): ?string
  44.     {
  45.         return $this->label;
  46.     }
  47.     public function setLabel(string $label): self
  48.     {
  49.         $this->label $label;
  50.         return $this;
  51.     }
  52.     public function getCode(): ?string
  53.     {
  54.         return $this->code;
  55.     }
  56.     public function setCode(string $code): self
  57.     {
  58.         $this->code $code;
  59.         return $this;
  60.     }
  61.     public function getCriteria2(): ?Criteria2
  62.     {
  63.         return $this->criteria2;
  64.     }
  65.     public function setCriteria2(?Criteria2 $criteria2): self
  66.     {
  67.         $this->criteria2 $criteria2;
  68.         return $this;
  69.     }
  70.     /**
  71.      * @return Collection<int, BlogPostCategory>
  72.      */
  73.     public function getBlogPostCategories(): Collection
  74.     {
  75.         return $this->blogPostCategories;
  76.     }
  77.     public function __toString(): string
  78.     {
  79.         return $this->getLabel();
  80.     }
  81. }