src/Entity/GalleryTag.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\Collection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity()
  7.  */
  8. class GalleryTag
  9. {
  10.     /**
  11.      * @var int
  12.      *
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column
  16.      */
  17.     private int $id;
  18.     /**
  19.      * @var string
  20.      *
  21.      * @ORM\Column
  22.      */
  23.     private string $tag;
  24.     /**
  25.      * @var Gallery[]|Collection
  26.      *
  27.      * @ORM\OneToMany(targetEntity=GalleryGalleryTag::class, mappedBy="tag")
  28.      */
  29.     private $galleries;
  30.     public function __toString()
  31.     {
  32.         return $this->tag;
  33.     }
  34.     public function getId(): int
  35.     {
  36.         return $this->id;
  37.     }
  38.     public function setId(int $id): GalleryTag
  39.     {
  40.         $this->id $id;
  41.         return $this;
  42.     }
  43.     public function getTag(): string
  44.     {
  45.         return $this->tag;
  46.     }
  47.     public function setTag(string $tag): GalleryTag
  48.     {
  49.         $this->tag $tag;
  50.         return $this;
  51.     }
  52.     public function getGalleries(): Collection
  53.     {
  54.         return $this->galleries;
  55.     }
  56.     public function setGalleries(Collection $galleries): GalleryTag
  57.     {
  58.         $this->galleries $galleries;
  59.         return $this;
  60.     }
  61. }