src/Entity/Gos/GoogleMerchantTag.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. /**
  8.  * GoogleMerchantTags
  9.  *
  10.  * @ORM\Table(name="google_merchant_tags")
  11.  * @UniqueEntity(fields="name", message="This name already exists!")
  12.  * @ORM\Entity(repositoryClass="App\Repository\GoogleMerchantTagRepository")
  13.  */
  14. class GoogleMerchantTag
  15. {
  16.     /**
  17.      * @var int
  18.      *
  19.      * @ORM\Column(name="id", type="integer")
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="AUTO")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @var string
  26.      *
  27.      * @ORM\Column(name="name", type="string", length=100, unique=true)
  28.      */
  29.     private $name;
  30.     /**
  31.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\GoogleMerchantFeed", mappedBy="customLabel0")
  32.      */
  33.     private $customLabels0;
  34.     /**
  35.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\GoogleMerchantFeed", mappedBy="customLabel1")
  36.      */
  37.     private $customLabels1;
  38.     /**
  39.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\GoogleMerchantFeed", mappedBy="customLabel2")
  40.      */
  41.     private $customLabels2;
  42.     /**
  43.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\GoogleMerchantFeed", mappedBy="customLabel3")
  44.      */
  45.     private $customLabels3;
  46.     /**
  47.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\GoogleMerchantFeed", mappedBy="customLabel4")
  48.      */
  49.     private $customLabels4;
  50.     public function __construct()
  51.     {
  52.         $this->customLabels0 = new \Doctrine\Common\Collections\ArrayCollection();
  53.         $this->customLabels1 = new \Doctrine\Common\Collections\ArrayCollection();
  54.         $this->customLabels2 = new \Doctrine\Common\Collections\ArrayCollection();
  55.         $this->customLabels3 = new \Doctrine\Common\Collections\ArrayCollection();
  56.         $this->customLabels4 = new \Doctrine\Common\Collections\ArrayCollection();
  57.     }
  58.     /**
  59.      * Get id
  60.      *
  61.      * @return int
  62.      */
  63.     public function getId()
  64.     {
  65.         return $this->id;
  66.     }
  67.     /**
  68.      * Set name
  69.      *
  70.      * @param string $name
  71.      *
  72.      * @return GoogleMerchantTag
  73.      */
  74.     public function setName($name)
  75.     {
  76.         $this->name $name;
  77.         return $this;
  78.     }
  79.     /**
  80.      * Get name
  81.      *
  82.      * @return string
  83.      */
  84.     public function getName()
  85.     {
  86.         return $this->name;
  87.     }
  88.     public function getAllLabels()
  89.     {
  90.         return new \Doctrine\Common\Collections\ArrayCollection(
  91.             array_merge(
  92.                 $this->customLabels0->toArray(),
  93.                 $this->customLabels1->toArray(),
  94.                 $this->customLabels2->toArray(),
  95.                 $this->customLabels3->toArray(),
  96.                 $this->customLabels4->toArray()
  97.             )
  98.         );
  99.     }
  100.     /**
  101.      * Add customLabels0
  102.      *
  103.      * @param \App\Entity\Gos\GoogleMerchantFeed $customLabels0
  104.      *
  105.      * @return GoogleMerchantTag
  106.      */
  107.     public function addCustomLabels0(\App\Entity\Gos\GoogleMerchantFeed $customLabels0)
  108.     {
  109.         $this->customLabels0[] = $customLabels0;
  110.         return $this;
  111.     }
  112.     /**
  113.      * Remove customLabels0
  114.      *
  115.      * @param \App\Entity\Gos\GoogleMerchantFeed $customLabels0
  116.      */
  117.     public function removeCustomLabels0(\App\Entity\Gos\GoogleMerchantFeed $customLabels0)
  118.     {
  119.         $this->customLabels0->removeElement($customLabels0);
  120.     }
  121.     /**
  122.      * Get customLabels0
  123.      *
  124.      * @return \Doctrine\Common\Collections\Collection
  125.      */
  126.     public function getCustomLabels0()
  127.     {
  128.         return $this->customLabels0;
  129.     }
  130.     /**
  131.      * Add customLabels1
  132.      *
  133.      * @param \App\Entity\Gos\GoogleMerchantFeed $customLabels1
  134.      *
  135.      * @return GoogleMerchantTag
  136.      */
  137.     public function addCustomLabels1(\App\Entity\Gos\GoogleMerchantFeed $customLabels1)
  138.     {
  139.         $this->customLabels1[] = $customLabels1;
  140.         return $this;
  141.     }
  142.     /**
  143.      * Remove customLabels1
  144.      *
  145.      * @param \App\Entity\Gos\GoogleMerchantFeed $customLabels1
  146.      */
  147.     public function removeCustomLabels1(\App\Entity\Gos\GoogleMerchantFeed $customLabels1)
  148.     {
  149.         $this->customLabels1->removeElement($customLabels1);
  150.     }
  151.     /**
  152.      * Get customLabels1
  153.      *
  154.      * @return \Doctrine\Common\Collections\Collection
  155.      */
  156.     public function getCustomLabels1()
  157.     {
  158.         return $this->customLabels1;
  159.     }
  160.     /**
  161.      * Add customLabels2
  162.      *
  163.      * @param \App\Entity\Gos\GoogleMerchantFeed $customLabels2
  164.      *
  165.      * @return GoogleMerchantTag
  166.      */
  167.     public function addCustomLabels2(\App\Entity\Gos\GoogleMerchantFeed $customLabels2)
  168.     {
  169.         $this->customLabels2[] = $customLabels2;
  170.         return $this;
  171.     }
  172.     /**
  173.      * Remove customLabels2
  174.      *
  175.      * @param \App\Entity\Gos\GoogleMerchantFeed $customLabels2
  176.      */
  177.     public function removeCustomLabels2(\App\Entity\Gos\GoogleMerchantFeed $customLabels2)
  178.     {
  179.         $this->customLabels2->removeElement($customLabels2);
  180.     }
  181.     /**
  182.      * Get customLabels2
  183.      *
  184.      * @return \Doctrine\Common\Collections\Collection
  185.      */
  186.     public function getCustomLabels2()
  187.     {
  188.         return $this->customLabels2;
  189.     }
  190.     /**
  191.      * Add customLabels3
  192.      *
  193.      * @param \App\Entity\Gos\GoogleMerchantFeed $customLabels3
  194.      *
  195.      * @return GoogleMerchantTag
  196.      */
  197.     public function addCustomLabels3(\App\Entity\Gos\GoogleMerchantFeed $customLabels3)
  198.     {
  199.         $this->customLabels3[] = $customLabels3;
  200.         return $this;
  201.     }
  202.     /**
  203.      * Remove customLabels3
  204.      *
  205.      * @param \App\Entity\Gos\GoogleMerchantFeed $customLabels3
  206.      */
  207.     public function removeCustomLabels3(\App\Entity\Gos\GoogleMerchantFeed $customLabels3)
  208.     {
  209.         $this->customLabels3->removeElement($customLabels3);
  210.     }
  211.     /**
  212.      * Get customLabels3
  213.      *
  214.      * @return \Doctrine\Common\Collections\Collection
  215.      */
  216.     public function getCustomLabels3()
  217.     {
  218.         return $this->customLabels3;
  219.     }
  220.     /**
  221.      * Add customLabels4
  222.      *
  223.      * @param \App\Entity\Gos\GoogleMerchantFeed $customLabels4
  224.      *
  225.      * @return GoogleMerchantTag
  226.      */
  227.     public function addCustomLabels4(\App\Entity\Gos\GoogleMerchantFeed $customLabels4)
  228.     {
  229.         $this->customLabels4[] = $customLabels4;
  230.         return $this;
  231.     }
  232.     /**
  233.      * Remove customLabels4
  234.      *
  235.      * @param \App\Entity\Gos\GoogleMerchantFeed $customLabels4
  236.      */
  237.     public function removeCustomLabels4(\App\Entity\Gos\GoogleMerchantFeed $customLabels4)
  238.     {
  239.         $this->customLabels4->removeElement($customLabels4);
  240.     }
  241.     /**
  242.      * Get customLabels4
  243.      *
  244.      * @return \Doctrine\Common\Collections\Collection
  245.      */
  246.     public function getCustomLabels4()
  247.     {
  248.         return $this->customLabels4;
  249.     }
  250. }