vendor/webbamboo/spinners-common/src/Entity/Citythumbnail.php line 15

  1. <?php
  2. namespace Webbamboo\SpinnersCommon\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Webbamboo\SpinnersCommon\Repository\CitythumbnailRepository;
  5. /**
  6.  * Citythumbnail
  7.  *
  8.  * @ORM\Table("Citythumbnail")
  9.  * @ORM\Entity
  10.  */
  11. #[ORM\Entity(repositoryClassCitythumbnailRepository::class)]
  12. class Citythumbnail
  13. {
  14.     /**
  15.      * @var integer
  16.      *
  17.      * @ORM\Column(name="id", type="integer")
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @var string
  24.      *
  25.      * @ORM\Column(name="path", type="string", length=255, unique=true)
  26.      */
  27.     private $path;
  28.     /**
  29.     * @ORM\ManyToOne(targetEntity="Citythumbnailalt", inversedBy="thumbnails")
  30.     * @ORM\JoinColumn(referencedColumnName="id")
  31.     */
  32.     private $alt;
  33.     /**
  34.     * @ORM\ManyToOne(targetEntity="Citythumbnailname", inversedBy="thumbnails")
  35.     * @ORM\JoinColumn(referencedColumnName="id")
  36.     */
  37.     private $name;
  38.     /**
  39.      * @ORM\OneToMany(targetEntity="City", mappedBy="thumbnail")
  40.      */
  41.     private $cities;
  42.     /**
  43.      * Get id
  44.      *
  45.      * @return integer
  46.      */
  47.     public function getId()
  48.     {
  49.         return $this->id;
  50.     }
  51.     /**
  52.      * Set path
  53.      *
  54.      * @param string $path
  55.      * @return Citythumbnail
  56.      */
  57.     public function setPath($path)
  58.     {
  59.         $this->path $path;
  60.         return $this;
  61.     }
  62.     /**
  63.      * Get path
  64.      *
  65.      * @return string
  66.      */
  67.     public function getPath()
  68.     {
  69.         return $this->path;
  70.     }
  71.     /**
  72.      * Set alt
  73.      *
  74.      * @param \Webbamboo\SpinnersCommon\Entity\Citythumbnailalt $alt
  75.      * @return Citythumbnail
  76.      */
  77.     public function setAlt(\Webbamboo\SpinnersCommon\Entity\Citythumbnailalt $alt null)
  78.     {
  79.         $this->alt $alt;
  80.         return $this;
  81.     }
  82.     /**
  83.      * Get alt
  84.      *
  85.      * @return \Webbamboo\SpinnersCommon\Entity\Citythumbnailalt
  86.      */
  87.     public function getAlt()
  88.     {
  89.         return $this->alt;
  90.     }
  91.     /**
  92.      * Set name
  93.      *
  94.      * @param \Webbamboo\SpinnersCommon\Entity\Citythumbnailname $name
  95.      * @return Citythumbnail
  96.      */
  97.     public function setName(\Webbamboo\SpinnersCommon\Entity\Citythumbnailname $name null)
  98.     {
  99.         $this->name $name;
  100.         return $this;
  101.     }
  102.     /**
  103.      * Get name
  104.      *
  105.      * @return \Webbamboo\SpinnersCommon\Entity\Citythumbnailname
  106.      */
  107.     public function getName()
  108.     {
  109.         return $this->name;
  110.     }
  111.     /**
  112.      * Constructor
  113.      */
  114.     public function __construct()
  115.     {
  116.         $this->cities = new \Doctrine\Common\Collections\ArrayCollection();
  117.     }
  118.     /**
  119.      * Add cities
  120.      *
  121.      * @param \Webbamboo\SpinnersCommon\Entity\City $cities
  122.      * @return Citythumbnail
  123.      */
  124.     public function addCity(\Webbamboo\SpinnersCommon\Entity\City $cities)
  125.     {
  126.         $this->cities[] = $cities;
  127.         return $this;
  128.     }
  129.     /**
  130.      * Remove cities
  131.      *
  132.      * @param \Webbamboo\SpinnersCommon\Entity\City $cities
  133.      */
  134.     public function removeCity(\Webbamboo\SpinnersCommon\Entity\City $cities)
  135.     {
  136.         $this->cities->removeElement($cities);
  137.     }
  138.     /**
  139.      * Get cities
  140.      *
  141.      * @return \Doctrine\Common\Collections\Collection
  142.      */
  143.     public function getCities()
  144.     {
  145.         return $this->cities;
  146.     }
  147. }